Chapter 10 Working With The State Modeler : Transitions

Transitions
The states in a state model are connected by transitions. Both state and transition resources are containers for rules, which control how each instance changes states and property values.
Self Transitions
Typically, transitions take an instance from one state to another state. Self transitions connect a state to itself, thereby reprocessing the rule set until conditions are met to transition to a different state. Each time the instance loops back to the state, it triggers the entry action, and each time it leaves the state, it triggers the exit action.
Complex Transitions
This subsection presents BusinessEvents behavior when transitioning into and out of composite and concurrent states. This discussion mentions entry and exit actions, which you can learn about in Entry and Exit Actions.
Composite State Transitions
Composite states allow to-boundary transitions, to-state transitions, from-boundary transitions, and from-state transitions, as shown:
When a transition enters or exits a composite state, it triggers the composite state’s entry or exit action. In the case of nested composite states, each time a transition passes the boundary of one of the composite states, it triggers the assigned action.
Composite and Concurrent State Transitions
To enter a composite or concurrent state from the boundary, its start state must have a transition to the next state:
Similarly, to exit a composite state from the boundary, its end state must have a transition coming from the previous state:
Loopbacks are allowed:
Transition Rules for Concurrent States
You can only transition into and out of a concurrent state through the boundaries. You cannot transition into or out of a state directly as you can with composite states.
As with nested composite states, to-boundary and from-boundary transitions trigger an entry or exit action each time they enter or exit a nested concurrent state.
Configuring a Transition
To configure a transition, perform these steps:
1.
2.
3.
4.
5.
6.
Type a label for the transition if desired. Transition labels do not have to follow Java naming requirements; therefore you can, for example, label the transition with the condition: a>b.
7.
Select the No Condition checkbox if you want to create a transition without a condition (that is, a lambda transition).
8.
Click the rules editor icon () to the right of the Rules field. The rule editor appears with both the Conditions and Actions panels. See Chapter 9, Working With Rules and Functions, for more information about working with the rule editor.