Transition conflict
If the transition search finds more than one transition that needs execution, then it is possible that there is a conflict between those transitions. A conflict means that not all of the transitions can be executed without causing conflicts when exiting states.
Two transitions are considered to be in conflict, if the intersection of the states that will be exited when executing the transitions is not empty.
In yasmine when a conflict is detected, an exception of type sxy::exception is thrown. When an exception is thrown, the state machine will be stopped.
Examples
Example 1
The states that have to be exited for the transition from 'Simple state 1' to 'Simple state 3' are 'Simple state 1' and 'Composite state 1'.
The states that have to be exited for the transition from 'Simple state 2' to 'Simple state 4' are 'Simple state 1' and 'Composite state 1'.
Thus composite state 'Composite state 1' appears in both lists of states to be exited. That means the two transitions are in conflict because the intersection of states that would have to be exited is not empty.
Example 2
The states that have to be exited for the transition from 'Simple state 1' to 'Simple 3' (transition 1) are 'Simple state 1', 'Composite state 3' and 'Composite state 2'.
The states that have to be exited for the transition from 'Simple state 2' to 'Simple state3' (transition 2) are 'Simple state 2' and 'Composite state 2'.
The states that have to be exited for the transition from 'Simple state 4' to 'Simple state 5' (transition 3) are 'Simple state 4' and 'Composite state 1'.
The composite state 'Composite state 2' appears in the exit lists of transition 1 and transition 2. That means the two transitions are in conflict.
There are no conflicts between

transition 1 and transition 3

transition 2 and transition 3
Example 3
In order to execute the transition 1 from 'Simple state 1' to 'Simple state 3' the following states need to be exited: 'Simple state 1', 'Composite state 3' and 'Composite state 2'.
In order to execute the transition 2 from 'Simple state 2' to 'Composite state 1' the following states need to be exited: 'Simple state 2', 'Composite state 2' and 'Composite state 1'.
In order to execute the transition 3 from 'Simple state 4' to 'Simple state 5' the following states need to be exited: 'Simple state 4' and 'Composite state 1'.
So, transition 1 is in conflict with transition 2 because the state 'Composite state 2' is exited in both cases.
Transition 2 is in conflict with transition 3 because the composite state 'Composite state 1' is exited in both cases.
Example 4
The two transitions are in conflict because both of them exit the composite state 'Composite state 3'.
Example 5
For the three transitions in the example above there is no transition conflict because the intersection of the states they cause to exit is empty.
The transition from the simple state 'Simple state 1' to 'Simple state 2' has to exit the states 'Simple state 1', 'Composite state 3' and 'Composite state 2'.
The transition from the simple state 'Simple state 3' to 'Simple state 4' has just to exit its source, the simple state 'Simple state 3'.
The transition from the simple state 'Simple state 5' to 'Simple state 6' has to exit the source 'Simple state 5' then 'Composite state 1'.
Example 6
The transitions are not in conflict because they are causing the exiting of the same state. The transition from 'Simple state 3' to the simple state 'Simple state4', will be executed before the transition from 'Simple state 1' to 'Simple state 2' because it does not exits the 'Composite state 1'.
In all the situations above, the transitions are sorted before they are executed. For details about transition sorting see the transition sort page.