Transition selection

Transition selection specifies which subset of active transitions to fire.

Two factors are considered:

  • Conflicts
  • Priorities

Transition conflicts

Two transitions are said to conflict if both cause the same state to exit. Only orthogonal or independent transitions fire simultaneously. This means that interleaved execution causes equivalent results. Disjoint exit states are a satisfactory condition for equivalent results.

Note: Regarding conflicts, static reactions are treated as transitions that exit and enter the state on which they are defined.

Transition priorities

Priorities resolve some, but not all, transition conflicts. IBM® Engineering Systems Design Rhapsody® uses state hierarchies to define priorities among conflicting transitions. However, lower-level (nested) states can override behaviors, thus implying higher priority.

The priority for a transition is based on its source state. Priorities are assigned to join transitions based on their source state.

For example, if transition t1 has a source state of s1 and transition t2 has a source state of s2:

  • If state s1 is a descendant of state s2, t1 has a higher priority than t2.
  • If states s1 and s2 are not hierarchically related, relative priorities between t1 and t2 are undefined.

Rhapsody does not define a priority with regard to events and transitions other than arrival order. If two transitions within the same orthogonal component are both active (ready to fire), as can happen with non-orthogonal guards, only one of them will actually fire, but statecharts do not specify which one it will be.