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:

Drawing a Transition Into a Subchart

To draw a supertransition from an object outside a subchart to an object inside the subchart:

  1. Position the mouse cursor over the border of the state.
  1. The cursor assumes the crosshairs shape.

  1. Drag the mouse.
  1. 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.

  1. Drag the segment's tip anywhere just inside the border of the subchart.
  1. 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.

  1. Continue dragging the cursor toward the center of the subchart.
  1. A wormhole appears in the center of the subchart.

    A wormhole allows you to open a subchart while drawing a supertransition.

  1. Drag the mouse pointer over the center of the wormhole.
  1. The subchart opens. Now the wormhole and supertransition are visible inside the subchart.

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

Drawing a Transition Out of a Subchart

To draw a supertransition out of a subchart:

  1. Draw an inner transition segment from the source object anywhere just outside the border of the subchart
  1. A slit appears.

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

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

  1. Complete the connection.


  Using Supertransitions in Stateflow Charts Labeling Supertransitions