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 tarek
Messages: 20
Registered: July 2013
Junior Member
Hi,
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 16 times)
Previous Topic:allInstances OrderedSet
Next Topic:closure operation
Goto Forum:
  


Current Time: Wed Oct 01 00:00:36 GMT 2014

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

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