Every state machine needs the top-most initial transition, which originates in an initial pseudostate (black dot) placed directly on the drawing canvas and points to the first active state after the state machine gets initialized.
Additionally, a composite state with nested substates might also have its own nested initial transition, which also originates in an initial pseudostate but placed inside a superstate and points to the default substate that becomes active after the superstate is entered by a transition.
In most UML tools, the process of drawing such initial transitions consists of first adding an initial pseudostate (black dot) and then attaching a transition between it and some state. In QM™ this process is simplified, because the State Machine Toolbox contains a ready-to-use Initial Transition tool, which combines an "initial pseudostate" with a transition attached permanently to it. This tool is used to add both the top-most initial transition and initial transitions nested within superstates.
You select the Initial Transition tool by clicking on the button in the State Machine Toolbox. At this point, when you hover the mouse over the active state diagram, the mouse pointer changes to the initial transition tool. To add an initial transition, move the mouse to the desired location of the initial pseduostate of the initial transition and press and hold down the left mouse button. At this point the mouse pointer changes to the initial transition with the "forbidden" icon (). Next, you need to drag the mouse to an edge of the target state. (If you release the mouse button without reaching the target state edge, the QM™ tool will delete the transition.) When you drag the mouse pointer over a state edge, the mouse pointer changes to the initial transition with an anchor (), which indicates that you can anchor the end of the initial transition connector at this edge. To anchor the transition, release the mouse button.
As you keep working on your state diagram, some initial transition(s) might easily become invalid. For example, after resizing of a state the initial pseudostate (black dot) of an initial transition might fall outside of the state shape, might start targeting a non-substate of the parent state, or a state might "acquire" an additional (second) initial transition. Such invalid initial transitions are shown with a dashed line.
The following animation shows how an initial transition can become invalid and how QM™ renders it:
An Initial Transition item can be configured by the Initial Transition-Specific Property Sheet.
The Initial Transition property sheet contains the following properties:
An Initial Transition can have optional action. If defined, the action shows up in the text-box associated with the Initial Transition.
An action is considered defined if the corresponding pseudocode or code boxes in the Initial Transition Property Sheet are not empty. Once an action is defined, it is shown in the text box associated with the Initial Transition (following the forward-slash /
character).
Once the initial transition is selected as the Current Item, you can move and resize the text-box by dragging it around or dragging the lower-right handle of the box (see the screen animation above).
All transitions in QM™ are rectilinear, meaning that they consist only of horizontal or vertical segments. You can adjust the position of the horizontal segments by dragging them up or down or the vertical segments by dragging them left and right.