Stateflow |
 |
Drawing a Supertransition
The procedure for drawing a supertransition differs slightly depending on whether you are drawing the supertransition from an object outside the subchart to an object inside the subchart or whether you are drawing the supertransition from an object inside the subchart to an object outside the subchart. The following sections describe these two different procedures:
Caution
You cannot undo the operation of drawing a supertransition. When you perform this operation, the undo and redo buttons are disabled from undoing and redoing any prior operations.
|
Drawing a Transition Into a Subchart
To draw a supertransition from an object outside a subchart to an object inside the subchart:
- Position the mouse cursor over the border of the state.
- The cursor assumes the crosshairs shape.

- Drag the mouse.
- Dragging the mouse causes a supertransition segment to appear. The segment looks like a regular transition. It is curved and is tipped by an arrowhead.

- Drag the segment's tip anywhere just inside the border of the subchart.
- The arrowhead now penetrates the slit.

If you are not happy with the initial position of the slit, you can continue to drag the slit around the inside edge of the subchart to the desired location.
- Continue dragging the cursor toward the center of the subchart.
- A wormhole appears in the center of the subchart.

A wormhole allows you to open a subchart while drawing a supertransition.
- Drag the mouse pointer over the center of the wormhole.
- The subchart opens. Now the wormhole and supertransition are visible inside the subchart.

- Drag and drop the tip of the supertransition anywhere on the border of the object that you want to terminate the transition.
- This completes the drawing of the supertransition.

Note
If the terminating object resides within a subchart in the current subchart, simply drag the tip of the supertransition through the wormhole of the inner subchart and complete the connection inside the inner chart. You can draw a supertransition to an object at any depth in the chart in this fashion.
|
Drawing a Transition Out of a Subchart
To draw a supertransition out of a subchart:
- Draw an inner transition segment from the source object anywhere just outside the border of the subchart
- A slit appears.

- Keep dragging the transition away from the border of the subchart.
- A wormhole appears.

- Drag the transition down the wormhole.
- The parent of the subchart appears.

- Complete the connection.

Note
If the parent chart is itself a subchart and the terminating object resides at a higher level in the subchart hierarchy, you can continue drawing by dragging the supertransition into the border of the parent subchart. This allows you to continue drawing the supertransition at the higher level. In this way, you can connect objects separated by any number of layers in the subchart hierarchy.
|
| Using Supertransitions in Stateflow Charts | | Labeling Supertransitions |  |