Exception Transition
An exception transition controls the switching to the next state or pseudo state, if an error or an exception occurs. It has a guard condition and an optional action.
The source state is usually a composite or orthogonal state. Exception transitions cannot be used for "normal" states. However, a "normal" state is active as a rule within the composite or orthogonal state, which has an exception transition.
An exception transition interrupts the current processing. The currently active state is first processed until the end of the cycle, so that the execution of the currently executed DO action(s) is completed. The system then enters the state that is intended in response to this exception. In this state, error handling and exception handling are executed. The source state is usually a composite or orthogonal state.
The exception transition is used to exit a composite state from every substate. Its state is evaluated after the DO action for the active state has been executed. Thus, even if the condition for the exception transition is already TRUE on the first occurrence of a composite state, the DO action of the first state is executed. Since ENTRY and EXIT actions are not linked to conditions, they are always executed independent of the exception transition. An exception transition can be interpreted such that it does not originate from a composite state, but directly from each substate. The conditions for the exception transitions are evaluated after their DO actions. Since ENTRY and EXIT actions are not linked to conditions, they are always executed independent of the exception transition. |
An exception transition is indicated by a red dashed arrow pointing to the next state.
Pseudo exception transitions
A pseudo exception transition replaces the end state in a composite state. It is indicated by a blue dashed arrow.
In some cases it is clearer to draw a transition at the edge of the composite state whose condition is used as a basis for exiting the whole composite state, instead of an end state in a composite state that is linked to many transitions. This is similar to an exception transition, but without the interpretation that this represents a malfunction. It is therefore referred to as a pseudo exception transition. A pseudo exception transition has no influence on the cyclic execution behavior.
Properties
"Property" | Description |
---|---|
"Relationship type" | Exception transition (not editable) |
"Priority" | Priority, which determines the processing order Sample: 3 Note: if the state has further transitions and you change the priority, all transitions are affected by the change and are automatically adjusted. |
"Pseudo exception" |
|
"Rising edge" |
|
Edit exception transition
User input in the state diagram | Response in the state diagram | Description |
---|---|---|
Select "Exception transition" in the toolbox. Click on a composite state (source state) and then on another state (target state). |
| An exception transition with TRUE condition and an action icon is created. |
Click on a composite state (source state) in the state diagram. | The icon through which an outgoing exception transition can be added to the selected state is available. If you use it, the state is extended with an outgoing exception transition. The target state is determined with a further click. | |
Double-click on the symbol |
| An input field with IntelliSense functionality opens. Select a Boolean variable or a Boolean expression. When the required option is selected in IntelliSense, it can be activated by double-clicking or by focusing plus [Enter]. |
Click the symbol twice |
| An input field with IntelliSense functionality opens. Select a method or action. When the required option is selected in IntelliSense, it can be activated by double-clicking or by focusing plus [Enter]. This selected method or action is executed when the transition has switched. |
Click on the transition, the action icon or the guard icon. |
| The transition is selected (indicated by a blue arrow). A selected transition can be moved via drag and drop. The position of the linked states remains unchanged. |
Click on the start or end of an exception transition. | The symbol enables reconnecting of the transition, while retaining the existing transition configuration. You can pull the symbol to another source or target state in order to connect the transition there. The corresponding condition and action are retained. |