Transition firing priority

It is possible for more than one transition to be enabled within a state chart. For example, there can be two transitions originating from the same state, triggered by the same event, but with different guards. In this case, only one of them fires in each step: the lower order transition (marked by a number near its exit from the state) fires.

Transitions that occur in parallel regions may be fired simultaneously.

A transition originating from a substate has higher priority than a transition originating from any of its containing states. The priority of a transition is based on its source state. The priority of joined transitions is based on the priority of the transition with the most transitively nested source state. In general, if t1 is a transition whose source state is s1, and t2 has source s2, then:

      If s1 is a direct or transitively nested substate of s2, then t1 has higher priority than t2.

      If s1 and s2 are not in the same state configuration, then there is no priority difference between t1 and t2.