Chain on a CallBehaviorAction for an Operation trigger of a Transition with an effect

Click on the image to view it full size
Watch simulation
The block HasSTM has a StateMachine of the same name, a value property i:Integer=0, and an Operation setAndChain(i:Integer):HasSTM with a method-chaining return of itself.

The parameters of the Activity DoSet used as an 'effect' on each Transition with Operation trigger setAndChain(i:Integer):HasSTM will be matched against the Operation.

The Activity TestHasSTM can then conveniently chain via the result OutputPin of each CallBehaviorAction.

If you run it in Cameo Simulation Toolkit® you get this monitor output:

00:00:22,302 : **** Activity TestHasSTM execution is terminated. **** 
00:00:00,000 : **** Activity TestHasSTM is initialized. **** 
00:00:00,000 : **** Activity TestHasSTM is started! **** 
HasSTM@1a24915f { 		i = [2] } 
00:00:35,274 : **** Activity TestHasSTM execution is terminated. ****

ASIDE: There are in fact two identical versions of Activity DoSet here to avoid the need for "wrapper" Activities:

You may wish to visit one of these tutorials next:

Visit more Systems Modeling Language (SysML®) tutorial trails here.
Visit also these screencast tutorial videos

Please email or phone Webel IT Australia on +61 405 029 008 to arrange on-site, off-site, or live remote web training seminars and workshops
Up next
Snippets (quotes/extracts)
Visit also
Visit also (backlinks)
Related slides (other tutorials)
Related slides (other tutorials, backlinks)