Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » Pb with closure operation
Pb with closure operation [message #1073316] Wed, 24 July 2013 14:07
Archevo tarek is currently offline Archevo tarekFriend
Messages: 21
Registered: July 2013
Junior Member
i want to see and understand how the closure operation works. I'm using the following expression on a BPEL process instance, just to compute the number of all the activities (elements composing the process) in the BPEL process instance:

self.activity.oclAsType(Sequence).activities->closure(a:Activity| a.oclAsType(Activity))->asSequence()->size()

It doesn't retrun the correct value. It doesn't navigate inside the other activities that may contain other activities (for example, another Sequence BPEL element that may contain different kind of activities and so on, we can go further in dept in the tree), and does not return them in the collection.

I want to recursively navigate in dept in the process for any composed activity and collect all the element then compute their number.

Or with this expression where i'm trying to get the number of a specific activity in the process:

self.activity->asSet()->closure(a: Activity| a.oclAsType(Sequence).activities->select(aa: Activity| aa.oclAsType(Assign).name='XX'))->size()"

I attached the ecore file representing the metamodel i'm using.

Please, can you help me to understand where is the problem with my expressions.
  • Attachment: bpel.ecore
    (Size: 49.39KB, Downloaded 71 times)
Previous Topic:allInstances OrderedSet
Next Topic:closure operation
Goto Forum:

Current Time: Sun May 27 01:41:55 GMT 2018

Powered by FUDForum. Page generated in 0.01899 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top