This one tends to bamboozle new Magic Model Analyst® (Cameo Simulation Toolkit®) users, not least because the simulation simply runs and ends without giving any diagnostics on the problem.
If you have a simple ControlFlow loop with a DecisionNode test you MUST have a MergeNode for the continuation path ControlFlow (typically entered also from an InitialNode or other control loop starting point).
If you don't have an intermediary MergeNode it is ill-formed, and the simulation will run but do nothing then end; it's not a tool bug, it's an fUML requirement.
The example shown uses Cameo's "magical" variable detection based on the [name]
in the untyped (freestyle) guard. You can have multiple outgoing ControlFlow edges from the DecisionNode with different guards [var1]
,[var2]
. The popup dialog will prompt for each in turn by identified name. Include an [else]
also so it is well formed!
There is a mini-video of the correct version running at:
If you found this page you probably have Magic Model Analyst® (Cameo Simulation Toolkit®), it's easy peasy, so try also giving it a quick go.
For a version using the fUML ReadLine CLI visit:
To see similar but with a LiteralBoolean guard instead of the "magical" variable detection in the guard shown above visit:
Visit also the many Mini SysML/UML simulations videos.