Conflict may occur when there are two or more enabled transitions which cause an exit from the same state. Some of these situations are resolved in the semantics of Statecharts by the transition priority rule.
When event E is generated, both the S3 to S4 transition and the S1 to S2 transition are enabled.
In such cases, priority is given to the transition for which the parent state common to both target states is of a higher hierarchical level.
In the above figure, the parent state of S2 is S3. The parent state of S4 is S5. Since S5 is a higher level state than S3, the S3 to S4 transition is taken.
Another conflict situation in which the Transition Priority Rule applies is when some state in the current system’s status contains an enabled static reaction simultaneously with an enabled transition exiting the state. The priority is given to the transition and the static reaction is not performed.