Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Executable Models: How to model non trivial guard with Papyrus and Moka(How to create a guard in an Activity diagram which depends on a property value of a class used in the Activity)
Executable Models: How to model non trivial guard with Papyrus and Moka [message #1406885] Mon, 11 August 2014 10:56 Go to next message
Manfred Kroehnert is currently offline Manfred KroehnertFriend
Messages: 6
Registered: August 2014
Junior Member
Hi,

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,
Manfred
Re: Executable Models: How to model non trivial guard with Papyrus and Moka [message #1410630 is a reply to message #1406885] Thu, 21 August 2014 08:48 Go to previous message
Manfred Kroehnert is currently offline Manfred KroehnertFriend
Messages: 6
Registered: August 2014
Junior Member
Does anybody face similar issues or can point me to some resources where I can figure it out on my own?
Previous Topic:Problems creating Papyrus models
Next Topic:Papyrus has Oomph!
Goto Forum:
  


Current Time: Sat Jul 04 16:27:06 GMT 2015

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

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