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.

By default, transitions are drawn as lines that can be bowed, unless you specified orthoganal drawing in State Chart Properties.

To create transitions

1.    Position the cursor over the edge of a source state. The cursor changes to Pencil.

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

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

statechart intro example state1 wire

3.    Release the mouse button.

The transition appears as a 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. If you have not specified orthogonal drawing in State Charts Properties, you can bend transitions.

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.

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

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

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

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