State Machine Diagrams
State machine diagrams describe how a system or a sub-system behaves in different states, and how it transitions between these states. Use state machine diagrams to specify how a system or a sub-system changes its state over time in response to different events.
In this example, the state machine diagram describes the behavior of a savings account. The diagram frame represents the state machine block Savings Account Behavior State Machine Diagram 1 (see State Machine Blocks). After its creation, the account switches between the Zero Balance state and the Account with Savings state as its owner makes deposits or withdrawals.

To create a state machine diagram, click the Create New Model command in the homepage Quick Links card (see Creating a Model), enter a name, select Object-Oriented Model in the Type list and SysML State Machine Diagram in the Template list, and click Create.
Alternatively, you can create state machine diagrams as a sub-diagram of a state machine block (see State Machine Blocks): Open a block definition diagram (see Block Definition Diagrams), select the state machine block (see State Machine Blocks) that you want to analyze and click Create State Machine Diagram.The new state machine diagram is listed in the Diagrams tab All Diagrams category of the state machine block’s property sheet.
The new diagram is initialized with a frame, which represents the boundary of the state machine block. If the state machine block is associated to a block (see Blocks) in your model, then the diagram can reference all of the block’s operations and receptions, as well as all the activity blocks in the model.
|
Tool |
Description |
|---|---|
|
|
State. See States. |
|
|
Initial. Specifies the initial state of the modeled system or sub-system. Drag the tool from the toolbox and drop it onto your diagram. Use the State tool from its context menu to create the next state in the diagram. |
|
|
Junction Point. See Junction Points. |
|
|
Final. Specifies the final state of the modeled system or sub-system. Drag the tool from the toolbox and drop it onto your diagram. |
|
|
Entry Point. See Entry Points and Exit Points. |
|
|
Exit Point. See Entry Points and Exit Points. |
|
|
Note. Add notes to your diagram and link them to your symbols. |
|
|
Link (Transition). The only link type in state machine diagrams is transition. See Transitions. |
|
|
Lasso. Select multiple symbols by dragging over them. |
|
|
Region. See Regions. |









