Skip to main content

Element: Transition

A transition controls the transition behavior between states.

. A transition is possible when one of the following events occurs:
  • Conditional event or change event

  • Completion event (when the actions of the source state are completed)

  • Time event

A transition has a guard condition and can have an action. The state transition is usually executed when the evaluation of the guard condition detects a rising edge. As an alternative, you can configure to detect whether or not the guard condition is TRUE. When the state transition is executed with the next clock cycle, first the action is executed and then the switch is made to the end state.

When a source state has multiple outgoing transitions, each transition is prioritized. You can change the priority in the properties of the transition. The priority defines the order in which the guard conditions are checked and the order in which the transitions are switched.

_uml_img_transition.png

Properties

Property

Description

Type

Transition

Priority

The priority defines the order of processing.

Example: 1

Note

If the state has other transitions and you change the priority, then all transitions are affected by the change and they are adapted automatically.

Rising edge

  • _cds_icon_checked.png: When the guard condition yields a rising edge (from 0 to 1), the transition is completed and the state transition is executed.

    Tip

    In the editor, an transition which behaves this way is indicated by the _uml_icon_transition_rising_edge.png symbol.

  • _cds_icon_option_deactivated.png: When the guard condition is TRUE, the transition is run.

    Tip

    If the guard condition is always TRUE, then the transition is executed one time.

User input

Action

Description

  1. In the ToolBox view, select the Transition element.

  2. Click a state in the statechart.

  3. Click another state.

    A transition is created with a TRUE condition and an action symbol.

    _uml_img_transition.png

Note

If you do not click an existing element, but in a blank area, then a new state is created.

  1. Double-click the _uml_transition_condition_default.png symbol.

    An input field opens.

    _uml_icon_input_assistant.png

  2. Select a Boolean variable or a Boolean expression.

When this condition is fulfilled, the switch is made to the transition.

  1. Click the _uml_icon_sc_transition_action.png symbol two times.

    The Input Assistant opens.

  2. Select a method or action there.

When you start typing, the matching components appear in a list box. You can double-click to select the object.

This selected method or action is executed when the transition has been switched.

  1. Click a transition, the action symbol, or the guard symbol one time.

    The transition is selected. This is indicated by a blue arrow.

  2. Move the transition.

The line of a transition can be moved anywhere. The states remain in place.

  1. Click the start or end of a transition.

    The _uml_icon_reconnect_transition.png symbol is displayed.

  2. Drag the symbol to another state.

You can use this function to move a transition to another state without losing the previous configuration. The corresponding condition and action remain unchanged.