Architecture & structure · Modeling language

UML

Choose a defined notation for structure, interactions, activities, or state changes.

Intermediate · 3 drills · Reviewed 2026-10-24

What it helps you do

Make the aspect being modeled explicit so readers can inspect relationships or behavior with a shared notation.

Starting knowledge: Understand the entities or behavior you want to model; notation can then be introduced.

  • Use a class view for types, associations, and multiplicities.
  • Use a sequence view for messages in time order; include important alternate paths.
  • Use activity or state-machine views for flow or lifecycle questions.

The problem it came from

UML unified earlier object-oriented modeling approaches and became an OMG standard in 1997. The OMG specification is the authoritative reference for its semantics.

This entry references UML 2.5.1. A class diagram, sequence diagram, activity diagram, and state machine describe different aspects of a system; they are not interchangeable decorations.

Work through an example

STARTING POINT
The system checks access and returns a document.
APPLYING THE APPROACH
Sequence sketch:
Reader → App: read document
App → Authorization: check membership
[allow] App → Store: retrieve
[deny] App → Reader: denied

Class sketch: Team 1 — 0..* Membership
Activity sketch: request → check → allow / deny
State sketch: Membership active → revoked
  • These textual sketches introduce distinct UML views; they are not a full normative model.
  • The deny branch is observable.
  • The class relationship and lifecycle need their own domain review.

Four views, four questions

Original teaching diagrams. Their simplified scope is explained beneath each view.

Sequence view

A read request and its authorization branchThe reader requests a document. The application checks authorization. Allow leads to a store read; deny leads to an access-denied response.ReaderApplicationAuthorizationStoreread documentcheck membership[allow] retrieve[deny] denied

The reader requests a document. The application checks authorization. Allow leads to a store read; deny leads to an access-denied response.

Class view

Team and membership class associationOne Team relates to zero or more Membership instances. Each Membership relates to exactly one Team. This example does not define the member’s identity or role policy.TeamMembershipteam_idmembership_id10..*has

One Team relates to zero or more Membership instances. Each Membership relates to exactly one Team. This example does not define the member’s identity or role policy.

Activity view

A read activity with an authorization decisionStart, check access, then branch. Allow retrieves a document; deny returns an error. These paths end without granting access on the denial path.Check access[allow][deny]Retrieve documentReturn denied

Start, check access, then branch. Allow retrieves a document; deny returns an error. These paths end without granting access on the denial path.

State view

Membership changes from active to revokedAn active membership transitions to revoked on a revocation event. The diagram does not define reinstatement or the treatment of in-flight requests.ActiveRevokedrevoke

An active membership transitions to revoked on a revocation event. The diagram does not define reinstatement or the treatment of in-flight requests.

Where it helps. Where it stops.

Use it when

  • You need to examine object relationships or an interaction.
  • The question concerns which event changes an object’s state.

Potential benefits

  • A suitable diagram can expose missing participants or outcomes.
  • Defined notation supports discussion beyond an author’s private drawing conventions.

Limits and common mistakes

  • A diagram is only as accurate as the model it depicts.
  • Notation tools may implement a subset or simplified semantics; rendered output is not a conformance check.
Applying it with AI

The prompt below asks for this structure. It does not guarantee accuracy, complete coverage, better learning, or conformance to a standard. Treat those outcomes as separate checks.

Practise the judgment

Try a choice, inspect a boundary, then explain a case yourself. Hints and answers are available whenever you need them.

DRILL 01 Not attempted

Which UML view best answers “who sends which messages during a request”?

Choose one answer
Hint

Look for message ordering.

Explained answer

Best answer for this case: Sequence diagram

A sequence diagram focuses on interactions among participants over time.

DRILL 02 Not attempted

Which view best captures a registration moving from waitlisted to confirmed?

Choose one answer
Hint

Distinguish what exists from how it changes.

Explained answer

Best answer for this case: State machine

The question is about state and transitions triggered by events.

DRILL 03 Not attempted

A sequence has only a success path. Add the missing behavior when authorization denies a read.

Hint

What operation must not occur on the deny path?

Explained answer & self-review rubric

Show an alternative in which authorization returns deny and the application returns an access-denied response without retrieving or sending document contents.

  • Include the decision response
  • Stop the protected read
  • Show an observable denial

Take it into your own work

Manual template

Use this structure yourself, with a colleague, or in your preferred writing tool.

# UML modeling brief
Question:
Chosen diagram type:
Participants or types:
Relationships and multiplicities:
Messages / actions / events:
Alternate or failure paths:
Constraints:
Source evidence:

Review the result

  • Does the diagram type fit the question?
  • Are alternate outcomes modeled?
  • Do labels and multiplicities match the domain?
Use this approach with your own AI tool
Help me apply UML to the material below.
Reader and existing knowledge: [describe]
Task and desired outcome: [describe]
Use these principles: Use a class view for types, associations, and multiplicities.; Use a sequence view for messages in time order; include important alternate paths.; Use activity or state-machine views for flow or lifecycle questions..
Preserve source facts, identifiers, quantities, conditions, exceptions, and uncertainty.
Separate supplied facts from assumptions. Ask for missing information instead of inventing it.
Explain your representation choices and provide a review checklist. Do not claim formal compliance or correctness from formatting alone.
Material: [paste only information you are permitted to share]
Download prompt

Go to the source

History and the underlying approach are grounded in these references. Examples, prompts, and practice cases here are original educational adaptations. Edition-specific details should be checked against the referenced publication.

Last editorial review: 2026-10-24. An overview is not certification, and this guide is not a reproduction of a standard.