Every time an event is received, the transition that becomes enabled with the highest total priority is fired. To fire a transition , the following algorithm is used:
Common superstates are the set of common superstates of two
or more states (,,...,). They are defined as:
The Closest Common Superstate (David Harel has called
it LCA, which is short for Lowest Common Ancestor) of
is defined as:
In this step, is decided. The model exits and all the states in the path from (not including itself). The exit actions of a state at a lower level are executed before the exit actions of a state at a higher level. If cannot be found (i.e., and have no common superstate, or ), all the current states are exited, and all their exit actions are executed in the correct order. (If we imagine there is a top state that encloses all the states in a model, the in this case is .)
Exit actions of orthogonal components belonging to the same parent are executed in an implementation-dependent order. This is because orthogonal components are logically simultaneous, and the designers should never make the behavior of their models dependent on the execution sequence of the actions among different orthogonal components.
Enter actions of orthogonal components belonging to the same parent are executed in an implementation-dependent order.
If , in which case the transition is a self-loop, the enter/exit actions of the state are executed, because is equal to the parent state of (or ).