Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

Important: The UML statechart diagram is not available in Visio 2013 and newer versions. For information on UML diagrams in Visio 2013 and newer versions, see UML diagrams in Visio.

Statechart diagram showing the transitions an object undergoes as it responds to outside events

Callout 1 The initial state is the state of an object before any events in the diagram have acted upon it.

Callout 2 A state represents an instant in the life of an object. Double-click a State shape to add a name and list its internal actions and activities.

Callout 3 Transitions indicate that, in response to an event, an object will go from one state to another and perform an action.

Callout 4 The event which triggers the transition is named in the transition string. Double-click a transition to label it with a string that, in addition to an event signature, can also include a guard condition, an action expression, and more.

Create a statechart diagram

  1. Open the UML model that contains the class or use case that includes behavior you want to represent in a statechart diagram.

  2. On the File menu, point to New, point to Software, and then click UML Model Diagram.

  3. In the tree view, right-click the icon representing the class or use case that includes behavior you want to represent in a statechart diagram. Point to New and click Statechart Diagram.

    A blank page appears, and the UML Statechart stencil becomes the top-most stencil. The workspace displays 'Statechart' as a watermark. An icon representing the diagram is added to the tree view.

    Note: If the tree view is not visible, on the UML menu, point to View, and then click Model Explorer.

  4. Drag State shapes onto the drawing page to represent the sequence of states an object goes through.

    Work with state shapes in UML statechart and activity diagrams

  5. Drag a Composite State shape onto the page to represent concurrent, mutually exclusive, or nested substates.

    Work with composite state shapes in UML statechart diagrams

  6. Connect states to other states using Transition shapes to indicate that an object in one state will enter the second state in response to an event.

    Work with transition shapes in UML statechart and activity diagrams

    Tip: Use the arc-shaped Transition shape to indicate that an object stays in the same state in response to an event. Connect both ends of the transition to connection points Connection point image - blue X on the same state shape.

  7. Connect Transition shapes to Transition (Join) and Transition (Fork) shapes to represent the forking of one state into multiple states or the synchronization of multiple states into one state.

  8. Use Shallow History or Deep History shapes to indicate that an object resumes a state it last held within a region.

    Work with composite state shapes in UML statechart diagrams

  9. Double-click any shape to open its UML Properties dialog box and add a name, actions, activities, events, and other properties.

  10. Save the diagram.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×