State Machine Diagram Example: Toaster


This is a state machine diagram for toaster. It consists of four states: power on, operating, power off and idle. The transitions between states indicate when a state will be changed to another. For example, when the toaster is 'operating', to trigger 'turn off' will cause it to be in 'power off' state.

Use this state diagram template as a starting point to create your own, or click Create Blank to start from scratch.

What is State Machine Diagram?

A state machine diagram consists of a finite number of states that embody information about the current situation in the system. The state machine is always in one of the finite states. Events are outside stimuli to the state machine. Triggered by events, each state has transitions to other states. A transition does not have to move the state machine to another state; it can also loop back to the same state. During a transition, some actions (called transition actions) might be performed. Many forms of state diagrams exist, which differ slightly and have different semantics. In UML semantics, an activity diagrams are reducible to State Machines with some additional notations

Activity vs. State Machines

In UML semantics Activity Diagrams are reducible to State Machines with some additional notations.

Activity Diagrams capture high level activities aspects.

  • Objects have behaviors and states. The state of an object depends on its current activity or condition.
  • The vertices represent the carrying out of an activity and the edges represent the transition on the completion of one collection of activities to the commencement of a new collection of activities.

State Machine Diagram shows the possible states of the object and the transitions that cause a change in state.

  • The vertices represent states of an object in a class and edges represent occurrences of events.
  • The additional notations capture how activities are coordinated.
  • In particular, it is possible to represent concurrency and coordination.

Keen to try VP Online?

No limitations, no obligations, no cancellation fees.

Start a Free Trial