Creating transitions

A transition is a relationship between two states that indicates when an object can move the focus of control on to another state once certain conditions are met. 

A transition is represented as line between two states. An arrowhead at one end of the transition indicates the direction of the transition.

When a state has multiple transitions exiting it, the transitions are numbered to indicate evaluation order.

After you create a transition, you can define a transition specification for it.

To create transitions

1.    Position the cursor over the edge of a source state. The cursor shape changes to a pencil (Pencil).

Note: If the crosshair has arrow heads, moving the mouse moves the state rather than draws the arc.

2.    Depress the mouse and drag into the target state body.

statechart intro example state1 wire

3.    Release the mouse button.

The transition will appear as a straight line from the source state to the target state.

4.    Repeat this exercise to create the following:

Creating a simple state chart initialstate and  3 state blks transitions 

 

 Notice that when multiple transitions are coming from a given state, Embed labels them according to evaluation order.  Transitions with lower numbers have higher priorities.

To bend and move transitions

1.    Click over a transition that you want to bend or move. The transition line turns purple, indicating that you can edit it.

      To bend the transition arc, point to the transition line and drag the mouse.

      To move where the transition line connects to a state, position the cursor over the end of the transition line you want to move. When the cursor changes to a 4-arrow crosshair, depress and drag the mouse.  

2.    Repeat step 1 for each transition arc until you have the following:

Creating a simple state chart initialstate and  3 state blks transitions 2