Skip to content

Latest commit

 

History

History
89 lines (53 loc) · 3.48 KB

Transitions.md

File metadata and controls

89 lines (53 loc) · 3.48 KB
Contents SCXML Wiki Forum

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

  • Lines

tr_lines

  • Square (IN: Top|Bottom)

tr_top

  • Square (IN: Left|Right)

tr_left

  • Curve

tr_curve

  • Connection over Left | Top | Right | Bottom

tr_over

Self Transitions (Connections)

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

How to create:

  • select state and press 'Make Self-connection' button in 'Tools (Bookmarks)' panel
  • select state, right-click to call context menu and hit menu item 'Make Self-connection'

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