Designating a self transition

Most transitions are from one state to another. This is not the case with self-transitions.

A self-transition, is one in which the source state and the target state are the same. There are two kinds of self-transitions.
External transition
In an external transition, all entry and exit actions are invoked during execution, and a change of state is registered.
Internal transition
An internal transition does not allow the exit and entry actions to be executed. An internal transition's triggering event must be either a call event or a timer event. Also, composite states cannot define internal transitions.
  1. Drop a state onto the canvas.
  2. Move the cursor over the state until the yellow "lollipop" appears above it as shown in this image.
    The yellow 'lollipop' appears when you highlight a state on the canvas.
  3. Hold the left mouse button. The cursor will change appearance, and will look like a crossed out circle.
  4. Drag the cursor out over the canvas. When you hover over a valid target, the crossed out circle disappears.
  5. Click the same state from which you are linking. A triangular transition will appear that indicates that you are creating a loop, and linking back into the same state.
    This transition indicates a self or an internal transition.
  6. By default, this is considered to be a external transition. To make it an internal transition, click the Description tab in the Properties area, and enable the Internal check box.

Feedback
(C) Copyright IBM Corporation 2005, 2007. All Rights Reserved.