Creating static and dynamic branches in capsule-based state machine diagrams

In capsule-based state machine diagrams, there are two main types of decision-making processes. You can create static conditional branches or dynamic conditional branches to direct the behavior of a state machine at the branching locations that you specify.

About this task

The main difference between static and dynamic conditional branches is the time when guards are evaluated. In static conditional branches the decision of which outgoing branches to take is made statically, before the incoming transition is taken. In dynamic conditional branches, the decision of which outgoing branch to take is made dynamically, after the incoming transition is taken. In other words, static conditional branches allow a transition path to be determined before any transition effects are executed. A dynamic conditional branch fires its transitions one at a time (executing their effects) before determining the next path at runtime.

Guards on outgoing transitions for conditional branches should be mutually exclusive and they should include a default else guard. This condition evaluates when none of the other transitions on the vertex fire and it ensures that the state machine does not break.


Feedback