About State Machine Diagram

A state machine diagram describes the behavior of a single object in response to a series of events in a system. A state diagram is based on a functional or logical structure.

This page discusses:

State Machine Diagram Structure

A state machine diagram is always created in a sheet. This sheet can be attached to a function or a logical component.

Elements of a State Machine Diagram

In a state machine diagram, you can insert different elements.

State

A state is the state of an object during its lifecycle.

Initial State

An initial state is the first state of an object.

Final State

A final state is the last state of an object.

Transition

A transition is a relationship between two states indicating that an object in the first state will, when a specified set of events and conditions are satisfied, perform certain actions and enter the second state. The following conditions can be applied to the transition:

  • Trigger: The cause of the transition. It can be a signal, an event, a change, or the passage of time.
  • Guard: The realization of a condition to enable the transition.
  • Effect: The action which is performed directly on the object that owns the state machine.

Reflexive Transition

A reflexive transition is a transition whose source and target states are the same. It is also known as a self-transition.

SubMachine State

A submachine state is a state which references another state machine diagram.

Composite State

A composite state is a state which contains several areas in parallel.

Junction Pseudo State

Junction pseudo states are used to chain together multiple transitions. A single junction can have one or more incomings, and one or more outgoing transitions.

History Pseudo State

An history pseudo state is used to remember the previous state of a state machine when interrupted. There are two types of history pseudo states:

  • Shallow history state: This state brings you back to the most recent event of a submachine state.
  • Deep history state: This state resumes to the initial submachine state.