TOPIC 14/4212 MINNOT STARTED

State diagrams: statuses and life cycles

A state diagram shows the conditions a thing can be in and which moves between them are allowed. Learn states, transitions and guards, and how a picture finds a forbidden move.

L1–L4 are part of the Pro pass

L0 Explain simply

Analogy: A parcel's journey. A parcel is "packed", then "shipped", then "delivered". It cannot be delivered before it is shipped. The status tells you what has happened and what can happen next.

Sam is a , the person who finds out what people need. Sam works on Daily List, a to-do list app. Nina, the who decides what the team builds next, wants tasks to be tidy. Leo, the developer, asks, "Can a done task go back to open? Can an open task be archived?" Nobody is sure.

So Sam draws a state diagram, a picture of the states a thing can be in and the moves between them. A state is a condition something is in, such as open or done. A task is in one active state at a time in this flat, single-region example.

A is a move from one state to another. "Mark done" moves a task from open to done.

A guard is a condition that must be true for a move to be allowed. Sam writes it in square brackets: [all sub-tasks are done].

As text: Open → Done: mark done [all sub-tasks are done]. Done → Open: reopen. Done → Archived: archive.

A parcel moves one way. A task may loop, because a done task can be reopened.

PICTURE IT

The picture is the one the lesson above opens with. The table below shows how each part of it matches the work.

THE REAL JOB A state diagram shows the conditions a thing can be in and which moves are allowed, so a team agrees the rules of its life cycle.

  1. Pick the thing
  2. List its states
  3. Mark the start
  4. Draw the moves
  5. Add guards and notes
Drawing a state diagram

HOW THE PICTURE MAPS

How each part of the picture matches the work
In the pictureIn the work
Packed, shipped, deliveredStates
Moving from packed to shippedA transition
A rule that a parcel must be shipped before deliveryA missing arrow or a guard
The scan that proves it left the depotA guard that must be true
A parcel that only moves one wayA limit of the picture

WHERE THIS PICTURE STOPS

  • A parcel moves one way. A task can loop back to open.
  • A parcel has one path. A task can have several allowed moves.
  • A parcel status is set by staff. A task state is set by rules in software.

HOOK

Boxes are where, arrows are moves, brackets are rules.

REMEMBER IT THIS WAY

A contrast: two neighbours told apart by one test.

In this flat single-region example, one simple state is active, while richer UML machines can have hierarchy and orthogonal regions. A transition describes an allowed change under its trigger and guard.

What each part of the trick stands for
In the trickWhat it stands for
Boxa state
Arrowa move between states
Guardthe rule for a move

TELL A FRIEND

A state diagram shows the conditions a thing can be in and the moves between them. A guard in brackets says when a move is allowed.

OFTEN MIXED UP WITH Activity diagrams. That topic shows the steps and choices of a piece of work. This one shows the conditions of one thing and its allowed moves.

PRACTISE AND KEEP

Sources for this topic — 2 sources
  1. Official requirement

    Unified Modeling Language (UML) 2.5.1 specification page ↗ — Object Management Group · UML 2.5.1 December 2017, §§7.5,9.5.3,11.5,14,15,17–18: multiplicity, state/activity/interaction and use-case semantics; public normative PDF opened/read2026-11-06.

    UML 2.5.1 December 2017; §§7.5,9.5.3,11.5,14,15,17 and18 opened/read6 November 2026, including prior actor review. · Checked 2026-11-06

    Official public catalogue/PDF retrieved and the cited sections read. UML 2.5.1 December 2017; §§7.5,9.5.3,11.5,14,15,17 and18 opened/read6 November 2026, including prior actor review. Original educational paraphrase; no source artwork copied.

  2. Simplified educational illustration

    Payments Signal editorial teaching models — Payments Signal

    This site's own simplified teaching models. · Checked 2026-07-12

    What this simplifies: The Daily List task states are invented for teaching. This topic shows only states, transitions and guards from the Unified Modeling Language and leaves out nested states, entry actions and exit actions.

    Used wherever diagrams, scenarios, figures, or example values are didactic constructions rather than sourced facts; every such use carries a simplifications disclosure. All people, companies, banks, and list entries in examples are fictional.

Deepest material on this page: L4 — Standards & sources. Where a topic stops short of implementation depth, that is a deliberate coverage decision, not an oversight — see coverage.