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.

A UML state machine diagram shows the behavior of a part of a designed system. How an object responds to an event depends on the state that object is in. A state machine diagram describes the response of an object to outside stimuli. The object can be a computer program, device, or process.

Note: Creating and editing UML diagrams on Visio for the web requires a Visio Plan 1 or Visio Plan 2 license, which is purchased separately from Microsoft 365. For more information, contact your Microsoft 365 admin. If your admin has turned on "self-service purchasing," you can buy a license for Visio yourself. For more details, see Self-service purchase FAQ.

Following are the shapes on the UML State Machine stencil.

Shape

Description

State shape.

Represents one possible state for the system. 

State Internal Behavior shape.

Represents one possible state for the system. After you add it to the diagram, type after each of the "/" characters to specify what actions occur when the system enters the state, while system is in the state, and when the system exists the state.

Composite state shape.

Represents a state that has sub-states, or nested states. Add other state shapes inside the composite shape.

Submachine shape.

Represents a composite state whose internal details aren't visible. 

Initial State shape.

Represents the state of an object before any transitions happen. For an object, this could be the state when it's instantiated. 

Final State shape.

Represents the state of an object in which no transitions lead out of. 

Choice shape.

Represents a conditional branch in the process flow. It evaluates the guards of the triggers of its outgoing transitions to select only one outgoing transition. 

Note shape.

Used as a diagram comment that has no semantic influence on the model elements.

See Also

Create a UML state machine 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!

×