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 ends the currently running execution and switches to the state that is foreseen for the reaction to this event. In this state the error handling and exception behavior are defined. Triggered by an exception, the exception transition ends the process of the currently active state or substate. The execution of the DO action(s) currently being executed will be completed.

Exception Transition 1:

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 tied 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 tied 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.

Exception Transition 2:

Pseudo exception transitions

A pseudo exception transition replaces the end state in a composite state. It is indicated by a blue dashed arrow.

Exception Transition 3:

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"

  • Exception Transition 4:: exception transition. The arrow is shown with a dashed red line in the editor. [Default setting]
  • Exception Transition 5:: pseudo exception transitions. The arrow is shown with a dashed blue line in the editor. If the condition is met, the state is exited. However, it is not a fault signal that triggers advancing.

"Rising edge"

  • Exception Transition 6:: if the guard condition returns a rising edge (from 0 to 1), the transition is passed through and the state transition is executed.
    Tip: in the editor, a transition that behaves in this way is marked with the symbol Exception Transition 7:.
  • Exception Transition 8:: if the guard condition is TRUE, the transition is passed through.

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).

Exception Transition 9:

An exception transition with TRUE condition and an action icon is created.

Click on a composite state (source state) in the state diagram.

Exception Transition 10:

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 Exception Transition 11:

Exception Transition 12:

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 Exception Transition 13: symbol twice

Exception Transition 14:

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].

Click on the transition, the action icon or the guard icon.

Exception Transition 15:

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.

Exception Transition 16:

The symbol Exception Transition 17: 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.