ScxmlEditor-Tutorial

Contents SCXML Wiki Forum

Transitions (Connections)

Transitions define how a state reacts to events that are generated either by the state machine or external entities. When events occur, the state machine checks for a matching transition defined in the active state and moves to its target state.

Transitions between states

Creation

1. Press 'Connect button'

tr_connect_btn

2. Press 'Ctrl+Right Mouse Button'

tr_connect_right

Visual types

tr_lines

tr_top

tr_left

tr_curve

tr_over

Self Transitions (Connections)

A self transition is a transition that starts and ends in the same state.

How to create:

Transitions_Self

Arrange Self Transitions (Connections)

Multiple self transitions may be quickly arranged by pressing 'Arrange Self-connections' menu item. Primary left and right coordinates for transitions are defined by the first transition

Transitions_Self_Arrange

Self Transitions Inside States

It is available since ScxmlEditor 2.4 to arrange self transitions inside of state.

tr_inside

  1. Set option SelfConnectionInside to true in the property inspector
  2. Execute Arrange Self-Connections command from IDE Insight or right popup menu
  3. (Optionally) Align Self-Transition to left, top, right or bottom side of the state

tr_align

Delayed transition

A delayed transition is a transition that happens after a period of time, specifically being in a specific state for a certain amount of time.

Delayed transitions are not part of SCXML. Instead, you have to specify to send a delayed event, and a normal transition that handles that event. The delayed event must be given a name, and also a unique identifier (in order to cancel the delayed event).

Transitions_Delayed

Copy-Paste Transitions

  1. Select a transition that you want to be copied

tr_copy

  1. Press 'Ctrl+C'

  2. Select two states that would be a source and a target of the transition

tr_sel

  1. Press 'Ctrl+V'

tr_paste

  1. Adjust transition layout if necessary
TOP Contents SCXML Wiki Forum