|Executable Models: How to model non trivial guard with Papyrus and Moka [message #1406885]
||Mon, 11 August 2014 10:56
| Manfred Kroehnert
Registered: August 2014
currently I am interested in model execution using Papyrus and Moka.
To get started, I followed the Model Execution Guide.
The software used is Eclipse Luna and Papyrus nightly version 1.0.0.v201408071725 (nightly version because of the Execution Engine issue mentioned in the wiki).
So far I was able to execute the BasicActiveObjectExample with the PSCS engine as explained in the guide.
Rebuilding this example from scratch worked, too, and the model is executable like the original one.
Afterwards I tried to extend the incrementClassifierBehavior Activity to abort after Increment::counter reaches a certain limit.
To me, adding a guard to the transition from the merge node to the This node seemed to be the obvious route to go.
Using the Expression guard I added the IntegerFunction "<" from FoundationalModelLibrary::PrimitiveBehaviors as the type of the expression and a LiteralInteger with value 5 as one operand.
However, I got stuck adding the value of Increment::counter as the second operand of the expression.
I tried the InstanceValue guard, but the dialog for selecting the "instance" property showed up empty.
It was also not possible to create a Constraint (which can access Increment::counter) and assign or use this as a guard in the transition.
Now my question is, how to model such a guard correctly and/or if my current approach is not correct or only missing a small piece.
Thanks for any help on this topic,
Powered by FUDForum
. Page generated in 0.07960 seconds