Archyno

Templates

UML sequence diagram template

An actor, a boundary, a controller and a store, with activations and a correct alt fragment already drawn. Rename the participants and the ordering survives.

Notation: UML 2.5.1Diagram: Sequence diagram

User«boundary»Web app«control»Auth service«entity»Databasesubmit requestverify(session)claimsread(id)record200 page401 unauthorizedaltsession validexpired or missing
The template as it opens. The alt fragment spans all four lifelines.

Open this template in Archyno

It opens as an editable model, not an image. Change it in the browser, then export to PNG, SVG, Mermaid, XMI, or a Sparx .qea file.

Open this template

What is on this diagram

User
The actor. A stick figure because they are outside the system.
Web app
The surface the request lands on. Rename to your entry point.
Auth service
Whatever decides. Swap for the collaborator your flow calls.
Database
The store. Delete it if your flow never reaches one.
alt fragment
The branch. Both guards are filled in - edit, do not remove.
Activations
The bars. They start when a call arrives and end at its reply.

How to make it yours

  1. Rename the four participants left to right, in the order the request actually travels.
  2. Rewrite the message labels as operations, not sentences - verify(session), not 'checks the session'.
  3. Keep every reply arrow dashed. A solid arrow back is a second call, and it means something else.
  4. Edit both guards on the alt fragment. An alt with one branch filled in is an opt.
  5. Stop at the first screen's worth. A sequence diagram that scrolls is two diagrams.

Common questions

What is an alt fragment in a sequence diagram?

A framed region split into compartments, one per alternative path, each with a guard in square brackets. Exactly one compartment runs. It is how a sequence diagram shows a branch, and it is the element that keeps a flow on one diagram instead of three.

Do I have to draw activation bars?

No, they are optional in UML 2.5.1, but they are worth keeping. The bar shows how long a participant is busy, which is the only way to see on the diagram that a synchronous call is blocking its caller for the whole nested exchange below it.

How many participants should a sequence diagram have?

Four or five, and rarely more. Past that the lifelines are too close to label and the diagram stops answering the question it was drawn for. If you need more, split the flow and reference the second diagram with a ref fragment.

Read the notation

All templates