Drawing state machine diagrams

State machine diagram shows flow of control from state to state within single object. It usually contains simple states, composite states, composite states, transitions, events and actions.

Creating state machine diagram

  • Click on UML on toolbar and select State Machine Diagram from the drop down menu.
  • Right click on State Machine Diagram in Diagram Navigator and select New State Machine Diagram from the popup menu.
  • Select File > New Diagram > UML Diagrams > State Machine Diagram from the main menu.
Create state machine diagram
Create state machine diagram

 

Creating states and transitions

After creating a state machine diagram, an initial pseudo state appears by default. Move the mouse over it and click its resource icon Transition -> State.

Create state from initial pseudo state
Create state from initial pseudo state

Drag it to your preferred place and then release the mouse to confirm the place. As a result, a state is created and is connected to the initial pseudo state with a transition.

State and transition created
State and transition created

Similarly, you can use the Transition -> Final State resource to create a final state.

Create final state
Create final state

Adding region to state

To model substates of a composite state, you need to add one or more regions to it. To add a region, right-click the state and select Add Horizontal Region from the popup menu.

Add region to state
Add region to state

Next, you can draw the substates inside the region.

Substates in a composite state
Substates in a composite state

Modeling properties of transition

To model properties of transition such as effect and guard, right-click the transition and select Open Specification... from the pop-up menu.

Open specification of transition
Open specification of transition

When the Transition Specification dialog box pops out, you can edit its name, effect and guard. Next, click Edit... button of the Effect property.

Transition Specification dialog box
Transition Specification dialog box

In Activity Specification (Effect) dialog box, change its name, and then click OK button to apply the change.

Click OK in the Transition Specification dialog box to close it. The name and effect are shown on the transition caption.

Name and effect shown in caption of transition
Name and effect shown in caption of transition
 
1. Drawing activity diagrams Table of Contents 3. Drawing timing diagrams
 

Product

Try this feature with

Visual Paradigm for UML

Technical Support

Have technical issues or suggestions? Please contact Visual Paradigm Support Team.

Sales Support

Have questions related to registration, licensing or payment? Feel free to contact Visual Paradigm Sales Team.

Discussion Forum

Share your suggestions of opinions at VP Discussion Forum.