Schematex
sequence·OMG UML 2.5.1 §17 (Interactions)·business, education·complexity 2/3·since v0.5.1

Login flow with an alt fragment

An authentication handshake across an actor, a Jacobson control object, and a database lifeline — synchronous calls open activation bars, a dashed reply returns the row, and an alt combined fragment splits the valid/invalid branches. A note records the session-cookie side effect.

For the backend engineer

Open in Playground →
sequence·§
↘ preview
100%
Sequence Diagram — Login flow 4 participants, 8 messages, 1 combined fragments. Login flow User Web App Auth DB alt [credentials valid] [invalid] submit(credentials) verify(credentials) SELECT user row token 200 OK 401 error session cookie set
UTF-8 · LF · 21 lines · 472 chars✓ parsed·6.7 ms·7.9 KB SVG

The canonical "who calls whom, in what order" diagram — and a good tour of the features that separate a UML sequence diagram from a generic flow.

Lifeline kinds carry meaning. actor, control, and database render their distinct UML/Jacobson heads (stick figure, circled arrow, cylinder), so the diagram tells you what kind of thing each participant is, not just its name.

Activation and replies. ->+ opens an activation bar on the callee; -- draws the dashed reply that returns control (and the row). Bars nest, so you can see Auth is active while it waits on DB.

Branching is a real fragment. The alt block with its [credentials valid] / [invalid] guards is a UML combined fragment, drawn as a labelled box spanning the lifelines — not two separate arrows you have to mentally group.

Sequence syntax