Skip to content

sequence

A UML sequence diagram (UML 2.5.1, chapter 17): lifelines from left to right in source order, messages and fragments from top to bottom. Fragments nest by indentation.

This page lists everything a sequence diagram may contain. The same grammar is available as data with dgr grammar sequence --json, and the overview explains how lines, texts and attributes are written and lists the codes every kind shares.

diagram sequence "Title" [subtitle=<text>] [look=<plain|cards>] [locale=<en|de>]

Every sequence diagram starts with this line.

PartKindValueMeaning
subtitle=attributea text in double quotes like "Order service"Second line below the title.
look=attributeone of plain, cardsplain (default) draws the UML notation, cards toned cards.
locale=attributeone of en, deLanguage of the texts Diagrist adds to the picture and of the description: en (default) or de.

Example:

diagram sequence "Title"

Each statement is one line that starts with its keyword. Statements inside blocks are indented below them. Like every kind, sequence also has use, variant, set and drop, described in the overview.

StatementWhereWhat it does
participanttop levelA lifeline drawn as a box, from left to right in source order.
actortop levelA lifeline drawn as a stick figure, from left to right in source order.
databasetop levelA lifeline drawn as a cylinder, from left to right in source order.
queuetop levelA lifeline drawn as a horizontal tube, from left to right in source order.
boundarytop levelA lifeline drawn as the boundary symbol of robustness analysis, from left to right in source order.
controltop levelA lifeline drawn as the control symbol of robustness analysis, from left to right in source order.
entitytop levelA lifeline drawn as the entity symbol of robustness analysis, from left to right in source order.
autonumbertop levelNumbers all messages in source order (1, 2, 3 …), across fragments; the number stands before the label.
frametop levelA frame around the whole interaction with sd Name in its tag.
msgtop level and inside blocksA message in source order; its arrow says what kind.
createtop level and inside blocksA creation message: dashed with an open head, and the head of the receiver stands at its height.
destroytop level and inside blocksDestruction: the lifeline ends here with an X.
activatetop level and inside blocksStarts an activation bar by hand, for processing after an asynchronous message.
deactivatetop level and inside blocksEnds the bar the last activate of this lifeline started.
notetop level and inside blocksA note at this point of the time axis, over the lifelines of over=.
reftop level and inside blocksA reference to another interaction (interaction use): a frame tagged ref over the lifelines of over=.
invarianttop level and inside blocksA state invariant at this point on the lifeline on=: a condition in {...}, or with state a state in a rounded box.
dividertop levelA divider on the time axis: a double line across all lifelines with the text in a box in the middle.
coregiontop level and inside blocksA coregion on the lifeline: the order of the indented events is arbitrary, drawn as square brackets on the lifeline.
alttop level and inside blocksAlternatives: the first operand whose guard holds is taken; further operands start with else.
elseinside altThe next operand of alt, written inside alt with its statements indented below it.
opttop level and inside blocksAn optional part, taken when its guard holds.
looptop level and inside blocksA repetition while the guard holds.
partop level and inside blocksParallel operands, separated by and; their events interleave freely.
andinside par, seq, strictThe next operand of par, seq or strict, written inside the fragment with its statements indented below it.
breaktop level and inside blocksEnds the enclosing interaction when the guard holds.
criticaltop level and inside blocksA critical region: its events are not interleaved.
seqtop level and inside blocksWeak sequencing of operands, separated by and.
stricttop level and inside blocksStrict sequencing of operands, separated by and.
negtop level and inside blocksAn invalid trace: what must not happen.
asserttop level and inside blocksThe only valid trace at this point.
ignoretop level and inside blocksMessages that may appear anywhere and are ignored; the guard lists their names and shows as ignore {...}.
considertop level and inside blocksOnly the listed messages are considered; the guard lists their names and shows as consider {...}.
durationtop levelA duration constraint between two messages with id=: a bracket from the first to the second, left of the lifeline both touch when there is room, otherwise mirrored to the right or at the left edge.
timetop levelA time constraint of one message with id=: a tick at its height left of its lifeline or at the left edge, the text in {...}.
adrtop levelAn architecture decision in the bar below the picture: question, the chosen option after =, and the consequence after =>.
participant <id> <label> [stereotype=<text>] [tone=<choice>] [external]

A lifeline drawn as a box, from left to right in source order. Messages, notes and references name it by its id. UML 2.5.1: 17.3.3.1 Lifeline.

Written at the top level.

PartKindValueMeaning
<id>argumentan identifier like api (letters, digits, _ and -, starting with a letter)Id that messages, activate, note and ref use for this lifeline.
<label>argumenta text in double quotes like "Order service"Name shown in the head.
stereotype=attributea text in double quotes like "Order service"Stereotype above the name, written without guillemets: service shows «service».
tone=attributeone of blue, indigo, purple, maroon, green, teal, slate, red, orange, peach, skyColour of the head and its bars in look=cards; without it the head is slate.
externalflagDraws the head dashed: the system is outside the scope of the diagram.

Example:

participant api "api-service" stereotype="service"
actor <id> <label> [stereotype=<text>] [tone=<choice>] [external]

A lifeline drawn as a stick figure, from left to right in source order. Messages, notes and references name it by its id. UML 2.5.1: 17.3.3.1 Lifeline.

Written at the top level.

PartKindValueMeaning
<id>argumentan identifier like api (letters, digits, _ and -, starting with a letter)Id that messages, activate, note and ref use for this lifeline.
<label>argumenta text in double quotes like "Order service"Name shown in the head.
stereotype=attributea text in double quotes like "Order service"Stereotype above the name, written without guillemets: service shows «service».
tone=attributeone of blue, indigo, purple, maroon, green, teal, slate, red, orange, peach, skyColour of the head and its bars in look=cards; without it the head is slate.
externalflagDraws the head dashed: the system is outside the scope of the diagram.

Example:

actor customer "Customer"
database <id> <label> [stereotype=<text>] [tone=<choice>] [external]

A lifeline drawn as a cylinder, from left to right in source order. Messages, notes and references name it by its id. UML 2.5.1: 17.3.3.1 Lifeline.

Written at the top level.

PartKindValueMeaning
<id>argumentan identifier like api (letters, digits, _ and -, starting with a letter)Id that messages, activate, note and ref use for this lifeline.
<label>argumenta text in double quotes like "Order service"Name shown in the head.
stereotype=attributea text in double quotes like "Order service"Stereotype above the name, written without guillemets: service shows «service».
tone=attributeone of blue, indigo, purple, maroon, green, teal, slate, red, orange, peach, skyColour of the head and its bars in look=cards; without it the head is slate.
externalflagDraws the head dashed: the system is outside the scope of the diagram.

Example:

database db "Orders DB"
queue <id> <label> [stereotype=<text>] [tone=<choice>] [external]

A lifeline drawn as a horizontal tube, from left to right in source order. Messages, notes and references name it by its id. UML 2.5.1: 17.3.3.1 Lifeline.

Written at the top level.

PartKindValueMeaning
<id>argumentan identifier like api (letters, digits, _ and -, starting with a letter)Id that messages, activate, note and ref use for this lifeline.
<label>argumenta text in double quotes like "Order service"Name shown in the head.
stereotype=attributea text in double quotes like "Order service"Stereotype above the name, written without guillemets: service shows «service».
tone=attributeone of blue, indigo, purple, maroon, green, teal, slate, red, orange, peach, skyColour of the head and its bars in look=cards; without it the head is slate.
externalflagDraws the head dashed: the system is outside the scope of the diagram.

Example:

queue broker "Kafka"
boundary <id> <label> [stereotype=<text>] [tone=<choice>] [external]

A lifeline drawn as the boundary symbol of robustness analysis, from left to right in source order. Messages, notes and references name it by its id. UML 2.5.1: 17.3.3.1 Lifeline.

Written at the top level.

PartKindValueMeaning
<id>argumentan identifier like api (letters, digits, _ and -, starting with a letter)Id that messages, activate, note and ref use for this lifeline.
<label>argumenta text in double quotes like "Order service"Name shown in the head.
stereotype=attributea text in double quotes like "Order service"Stereotype above the name, written without guillemets: service shows «service».
tone=attributeone of blue, indigo, purple, maroon, green, teal, slate, red, orange, peach, skyColour of the head and its bars in look=cards; without it the head is slate.
externalflagDraws the head dashed: the system is outside the scope of the diagram.

Example:

boundary form "Order form"
control <id> <label> [stereotype=<text>] [tone=<choice>] [external]

A lifeline drawn as the control symbol of robustness analysis, from left to right in source order. Messages, notes and references name it by its id. UML 2.5.1: 17.3.3.1 Lifeline.

Written at the top level.

PartKindValueMeaning
<id>argumentan identifier like api (letters, digits, _ and -, starting with a letter)Id that messages, activate, note and ref use for this lifeline.
<label>argumenta text in double quotes like "Order service"Name shown in the head.
stereotype=attributea text in double quotes like "Order service"Stereotype above the name, written without guillemets: service shows «service».
tone=attributeone of blue, indigo, purple, maroon, green, teal, slate, red, orange, peach, skyColour of the head and its bars in look=cards; without it the head is slate.
externalflagDraws the head dashed: the system is outside the scope of the diagram.

Example:

control checkout "Checkout"
entity <id> <label> [stereotype=<text>] [tone=<choice>] [external]

A lifeline drawn as the entity symbol of robustness analysis, from left to right in source order. Messages, notes and references name it by its id. UML 2.5.1: 17.3.3.1 Lifeline.

Written at the top level.

PartKindValueMeaning
<id>argumentan identifier like api (letters, digits, _ and -, starting with a letter)Id that messages, activate, note and ref use for this lifeline.
<label>argumenta text in double quotes like "Order service"Name shown in the head.
stereotype=attributea text in double quotes like "Order service"Stereotype above the name, written without guillemets: service shows «service».
tone=attributeone of blue, indigo, purple, maroon, green, teal, slate, red, orange, peach, skyColour of the head and its bars in look=cards; without it the head is slate.
externalflagDraws the head dashed: the system is outside the scope of the diagram.

Example:

entity order "Order"
autonumber

Numbers all messages in source order (1, 2, 3 …), across fragments; the number stands before the label.

Written at the top level.

Example:

autonumber
frame [label]

A frame around the whole interaction with sd Name in its tag. Without a name it shows the title. Gates (gate in msg) draw the frame without this line too. UML 2.5.1: 17.2.3.1 Interaction, drawn as a frame.

Written at the top level.

PartKindValueMeaning
[label]optional argumenta text in double quotes like "Order service"Name of the interaction in the tag; defaults to the title.

Example:

frame "OAuth callback"
msg <from> <arrow> <to> [label] [id=<id>] [mark=<ref>] [duration=<text>] [emph]

A message in source order; its arrow says what kind. Sender equal to receiver is a self call. Calls and replies activate the receiver by themselves. found as sender and lost as receiver are found and lost messages; gate is a gate on the frame of the interaction (gate -> a comes in from the left, a --> gate replies to the left, a -> gate leaves to the right), gate.name names it. The id= of a ref or fragment as an end leads the message to its edge. UML 2.5.1: 17.4.3.1 Message.

Written at the top level and inside coregion, alt, else, opt, loop, par, and, break, critical, seq, strict, neg, assert, ignore or consider.

PartKindValueMeaning
<from>argumenta lifeline id like api, found, lost, gate, gate.name, or the id= of a ref or fragment, optionally with .nameSender: a lifeline, found, gate, or a frame with id=. UML 2.5.1: found 17.4.3.1 Found message, without sender; gate 17.4.3.5 Gate on the frame of the interaction.
<arrow>argumentone of the arrows -> synchronous call (filled head), ~> asynchronous message (open head), --> reply (dashed, open head)The kind of message, which also decides how it is drawn. UML 2.5.1: -> 17.4.3.1 Synchronous call; ~> 17.4.3.1 Asynchronous call or signal; --> 17.4.3.1 Reply to a call.
<to>argumenta lifeline id like api, found, lost, gate, gate.name, or the id= of a ref or fragment, optionally with .nameReceiver: a lifeline, lost, gate, or a frame with id=. UML 2.5.1: lost 17.4.3.1 Lost message, without receiver; gate 17.4.3.5 Gate on the frame of the interaction.
[label]optional argumenta text in double quotes like "Order service"What is sent; without it the arrow has no label.
id=attributean identifier like api (letters, digits, _ and -, starting with a letter)Name of the message that duration and time refer to.
mark=attributethe id of an adr declared in this diagramId of a decision of the decision bar, such as E1; the mark is drawn after the label.
duration=attributea text in double quotes like "Order service"Duration of the transmission: the arrow slopes down and shows the text in {...}. UML 2.5.1: 8.5.3.2 Duration constraint.
emphflagHighlights the message in the accent colour.

The values of arrow and what they mean:

ValueMeaning
->synchronous call (filled head)
~>asynchronous message (open head)
-->reply (dashed, open head)

Examples:

msg client -> api "GET /orders" id=request
msg api --> client "200 OK"
msg gate.order -> api "place(order)" emph
create <from> <arrow> <to> [label] [id=<id>] [mark=<ref>] [duration=<text>] [emph]

A creation message: dashed with an open head, and the head of the receiver stands at its height. Before it the lifeline does not exist. UML 2.5.1: 17.4.3.1 Message that creates a lifeline.

Written at the top level and inside alt, else, opt, loop, par, and, break, critical, seq, strict, neg, assert, ignore or consider.

PartKindValueMeaning
<from>argumentthe id of a participant, actor, database, queue, boundary, control or entity declared in this diagramThe lifeline that creates.
<arrow>argumentone of the arrows ->Always ->.
<to>argumentthe id of a participant, actor, database, queue, boundary, control or entity declared in this diagramThe lifeline that is created.
[label]optional argumenta text in double quotes like "Order service"The constructor call; without it the arrow has no label.
id=attributean identifier like api (letters, digits, _ and -, starting with a letter)Name of the message that duration and time refer to.
mark=attributethe id of an adr declared in this diagramId of a decision of the decision bar, such as E1; the mark is drawn after the label.
duration=attributea text in double quotes like "Order service"Duration of the transmission: the arrow slopes down and shows the text in {...}. UML 2.5.1: 8.5.3.2 Duration constraint.
emphflagHighlights the message in the accent colour.

Example:

create client -> meter "new MeterData()"
destroy <target>

Destruction: the lifeline ends here with an X. No message reaches it afterwards. UML 2.5.1: 17.4.3.4 End of a lifeline (destruction).

Written at the top level and inside alt, else, opt, loop, par, and, break, critical, seq, strict, neg, assert, ignore or consider.

PartKindValueMeaning
<target>argumentthe id of a participant, actor, database, queue, boundary, control or entity declared in this diagramThe lifeline that ends.

Example:

destroy session
activate <target>

Starts an activation bar by hand, for processing after an asynchronous message. Calls and replies need none, their bars appear by themselves. Ends with deactivate. UML 2.5.1: 17.2.3.4 Execution on a lifeline (activation bar).

Written at the top level and inside coregion, alt, else, opt, loop, par, and, break, critical, seq, strict, neg, assert, ignore or consider.

PartKindValueMeaning
<target>argumentthe id of a participant, actor, database, queue, boundary, control or entity declared in this diagramThe lifeline whose bar starts at the last message.

Example:

activate worker
deactivate <target>

Ends the bar the last activate of this lifeline started. UML 2.5.1: 17.2.3.4 Execution on a lifeline (activation bar).

Written at the top level and inside coregion, alt, else, opt, loop, par, and, break, critical, seq, strict, neg, assert, ignore or consider.

PartKindValueMeaning
<target>argumentthe id of a participant, actor, database, queue, boundary, control or entity declared in this diagramThe lifeline whose bar ends at the last message.

Example:

deactivate worker
note <text> [over=<lifelines>]

A note at this point of the time axis, over the lifelines of over=. Long texts wrap. UML 2.5.1: 7.2.3.2 Comment (note).

Written at the top level and inside coregion, alt, else, opt, loop, par, and, break, critical, seq, strict, neg, assert, ignore or consider.

PartKindValueMeaning
<text>argumenta text in double quotes like "Order service"What the note says.
over=attributelifeline ids separated by commas without spaces, like auftrag,lagerLifelines it spans, comma separated without spaces, like over=auftrag,lager. Required.

Example:

note "Idempotency key = order number" over=api,db
ref <label> [over=<lifelines>] [id=<id>] [file=<text>]

A reference to another interaction (interaction use): a frame tagged ref over the lifelines of over=. With id=r the messages right after it that name r as an end run to its edge (actual gates, r.name names them), and the frame grows to hold them. UML 2.5.1: 17.7.3.1 Use of another interaction (ref).

Written at the top level and inside alt, else, opt, loop, par, and, break, critical, seq, strict, neg, assert, ignore or consider.

PartKindValueMeaning
<label>argumenta text in double quotes like "Order service"Name of the referenced interaction.
over=attributelifeline ids separated by commas without spaces, like auftrag,lagerLifelines it spans, comma separated without spaces, like over=auftrag,lager. Required.
id=attributean identifier like api (letters, digits, _ and -, starting with a letter)Name of the frame, for messages that start or end at its edge. UML 2.5.1: 17.4.3.5 Gate on an interaction use.
file=attributea text in double quotes like "Order service"File of the referenced sequence diagram, relative to this one; named in the description.

Example:

ref "Authorize payment" over=payment,psp id=pay file="authorize-payment.dgr"
invariant <text> [on=<ref>] [state]

A state invariant at this point on the lifeline on=: a condition in {...}, or with state a state in a rounded box. UML 2.5.1: 17.2.3.5 State invariant.

Written at the top level and inside alt, else, opt, loop, par, and, break, critical, seq, strict, neg, assert, ignore or consider.

PartKindValueMeaning
<text>argumenta text in double quotes like "Order service"The condition or state, without braces.
on=attributethe id of a participant, actor, database, queue, boundary, control or entity declared in this diagramThe lifeline the invariant holds on. Required.
stateflagDraws a state in a rounded box instead of a condition in braces.

Example:

invariant "logged in" on=bff state
divider [label]

A divider on the time axis: a double line across all lifelines with the text in a box in the middle. Only at the top level, not inside a fragment.

Written at the top level.

PartKindValueMeaning
[label]optional argumenta text in double quotes like "Order service"Name of the section that starts here.

Example:

divider "Accept the webhook"
coregion <on>

A coregion on the lifeline: the order of the indented events is arbitrary, drawn as square brackets on the lifeline. Only messages from or to it, activate, deactivate and note may stand in it. UML 2.5.1: 17.6.4.10 Coregion, unordered events on one lifeline.

Written at the top level and inside alt, else, opt, loop, par, and, break, critical, seq, strict, neg, assert, ignore or consider. Indented below it: msg, activate, deactivate, note.

PartKindValueMeaning
<on>argumentthe id of a participant, actor, database, queue, boundary, control or entity declared in this diagramThe lifeline whose events are unordered.

Example:

coregion notify
alt [guard] [id=<id>]

Alternatives: the first operand whose guard holds is taken; further operands start with else. The statements indented below it belong to the fragment; fragments nest. UML 2.5.1: 17.6.3.3 Combined fragment, 17.6.3.7 Alternatives (alt), 17.6.3.1 Operand of a combined fragment.

Written at the top level and inside alt, else, opt, loop, par, and, break, critical, seq, strict, neg, assert, ignore or consider. Indented below it: msg, create, destroy, activate, deactivate, note, ref, invariant, coregion, alt, opt, loop, par, break, critical, seq, strict, neg, assert, ignore, consider, else.

PartKindValueMeaning
[guard]optional argumenta text in double quotes like "Order service"Condition of the first operand, without brackets; Diagrist adds [...]. UML 2.5.1: 17.6.3.2 Guard of an operand.
id=attributean identifier like api (letters, digits, _ and -, starting with a letter)Name of the frame: a message with this name as an end starts or ends at its edge (a gate of the fragment, f.name names it). UML 2.5.1: 17.4.3.5 Gate on a combined fragment.

Example:

alt "token valid"
else [guard]

The next operand of alt, written inside alt with its statements indented below it. Without a guard it shows [else]. A dashed line separates the operands. UML 2.5.1: 17.6.3.1 Operand of a combined fragment.

Written only inside alt. Indented below it: msg, create, destroy, activate, deactivate, note, ref, invariant, coregion, alt, opt, loop, par, break, critical, seq, strict, neg, assert, ignore, consider.

PartKindValueMeaning
[guard]optional argumenta text in double quotes like "Order service"Condition of this operand, without brackets. UML 2.5.1: 17.6.3.2 Guard of an operand.

Example:

else "invalid token"
opt [guard] [id=<id>]

An optional part, taken when its guard holds. The statements indented below it belong to the fragment; fragments nest. UML 2.5.1: 17.6.3.3 Combined fragment, 17.6.3.8 Option (opt), 17.6.3.1 Operand of a combined fragment.

Written at the top level and inside alt, else, opt, loop, par, and, break, critical, seq, strict, neg, assert, ignore or consider. Indented below it: msg, create, destroy, activate, deactivate, note, ref, invariant, coregion, alt, opt, loop, par, break, critical, seq, strict, neg, assert, ignore, consider.

PartKindValueMeaning
[guard]optional argumenta text in double quotes like "Order service"Condition of the first operand, without brackets; Diagrist adds [...]. UML 2.5.1: 17.6.3.2 Guard of an operand.
id=attributean identifier like api (letters, digits, _ and -, starting with a letter)Name of the frame: a message with this name as an end starts or ends at its edge (a gate of the fragment, f.name names it). UML 2.5.1: 17.4.3.5 Gate on a combined fragment.

Example:

opt "3-D Secure required"
loop [guard] [id=<id>]

A repetition while the guard holds. The statements indented below it belong to the fragment; fragments nest. UML 2.5.1: 17.6.3.3 Combined fragment, 17.6.3.17 Loop (loop), 17.6.3.1 Operand of a combined fragment.

Written at the top level and inside alt, else, opt, loop, par, and, break, critical, seq, strict, neg, assert, ignore or consider. Indented below it: msg, create, destroy, activate, deactivate, note, ref, invariant, coregion, alt, opt, loop, par, break, critical, seq, strict, neg, assert, ignore, consider.

PartKindValueMeaning
[guard]optional argumenta text in double quotes like "Order service"Condition of the first operand, without brackets; Diagrist adds [...]. UML 2.5.1: 17.6.3.2 Guard of an operand.
id=attributean identifier like api (letters, digits, _ and -, starting with a letter)Name of the frame: a message with this name as an end starts or ends at its edge (a gate of the fragment, f.name names it). UML 2.5.1: 17.4.3.5 Gate on a combined fragment.

Example:

loop "at most 3 times" id=retry
par [guard] [id=<id>]

Parallel operands, separated by and; their events interleave freely. The statements indented below it belong to the fragment; fragments nest. UML 2.5.1: 17.6.3.3 Combined fragment, 17.6.3.10 Parallel (par), 17.6.3.1 Operand of a combined fragment.

Written at the top level and inside alt, else, opt, loop, par, and, break, critical, seq, strict, neg, assert, ignore or consider. Indented below it: msg, create, destroy, activate, deactivate, note, ref, invariant, coregion, alt, opt, loop, par, break, critical, seq, strict, neg, assert, ignore, consider, and.

PartKindValueMeaning
[guard]optional argumenta text in double quotes like "Order service"Condition of the first operand, without brackets; Diagrist adds [...]. UML 2.5.1: 17.6.3.2 Guard of an operand.
id=attributean identifier like api (letters, digits, _ and -, starting with a letter)Name of the frame: a message with this name as an end starts or ends at its edge (a gate of the fragment, f.name names it). UML 2.5.1: 17.4.3.5 Gate on a combined fragment.

Example:

par
and [guard]

The next operand of par, seq or strict, written inside the fragment with its statements indented below it. UML 2.5.1: 17.6.3.1 Operand of a combined fragment.

Written only inside par, seq or strict. Indented below it: msg, create, destroy, activate, deactivate, note, ref, invariant, coregion, alt, opt, loop, par, break, critical, seq, strict, neg, assert, ignore, consider.

PartKindValueMeaning
[guard]optional argumenta text in double quotes like "Order service"Condition of this operand, without brackets. UML 2.5.1: 17.6.3.2 Guard of an operand.

Example:

and
break [guard] [id=<id>]

Ends the enclosing interaction when the guard holds. The statements indented below it belong to the fragment; fragments nest. UML 2.5.1: 17.6.3.3 Combined fragment, 17.6.3.9 Break (break), 17.6.3.1 Operand of a combined fragment.

Written at the top level and inside alt, else, opt, loop, par, and, break, critical, seq, strict, neg, assert, ignore or consider. Indented below it: msg, create, destroy, activate, deactivate, note, ref, invariant, coregion, alt, opt, loop, par, break, critical, seq, strict, neg, assert, ignore, consider.

PartKindValueMeaning
[guard]optional argumenta text in double quotes like "Order service"Condition of the first operand, without brackets; Diagrist adds [...]. UML 2.5.1: 17.6.3.2 Guard of an operand.
id=attributean identifier like api (letters, digits, _ and -, starting with a letter)Name of the frame: a message with this name as an end starts or ends at its edge (a gate of the fragment, f.name names it). UML 2.5.1: 17.4.3.5 Gate on a combined fragment.

Example:

break "timeout"
critical [guard] [id=<id>]

A critical region: its events are not interleaved. The statements indented below it belong to the fragment; fragments nest. UML 2.5.1: 17.6.3.3 Combined fragment, 17.6.3.14 Critical region (critical), 17.6.3.1 Operand of a combined fragment.

Written at the top level and inside alt, else, opt, loop, par, and, break, critical, seq, strict, neg, assert, ignore or consider. Indented below it: msg, create, destroy, activate, deactivate, note, ref, invariant, coregion, alt, opt, loop, par, break, critical, seq, strict, neg, assert, ignore, consider.

PartKindValueMeaning
[guard]optional argumenta text in double quotes like "Order service"Condition of the first operand, without brackets; Diagrist adds [...]. UML 2.5.1: 17.6.3.2 Guard of an operand.
id=attributean identifier like api (letters, digits, _ and -, starting with a letter)Name of the frame: a message with this name as an end starts or ends at its edge (a gate of the fragment, f.name names it). UML 2.5.1: 17.4.3.5 Gate on a combined fragment.

Example:

critical
seq [guard] [id=<id>]

Weak sequencing of operands, separated by and. The statements indented below it belong to the fragment; fragments nest. UML 2.5.1: 17.6.3.3 Combined fragment, 17.6.3.11 Weak sequencing (seq), 17.6.3.1 Operand of a combined fragment.

Written at the top level and inside alt, else, opt, loop, par, and, break, critical, seq, strict, neg, assert, ignore or consider. Indented below it: msg, create, destroy, activate, deactivate, note, ref, invariant, coregion, alt, opt, loop, par, break, critical, seq, strict, neg, assert, ignore, consider, and.

PartKindValueMeaning
[guard]optional argumenta text in double quotes like "Order service"Condition of the first operand, without brackets; Diagrist adds [...]. UML 2.5.1: 17.6.3.2 Guard of an operand.
id=attributean identifier like api (letters, digits, _ and -, starting with a letter)Name of the frame: a message with this name as an end starts or ends at its edge (a gate of the fragment, f.name names it). UML 2.5.1: 17.4.3.5 Gate on a combined fragment.

Example:

seq
strict [guard] [id=<id>]

Strict sequencing of operands, separated by and. The statements indented below it belong to the fragment; fragments nest. UML 2.5.1: 17.6.3.3 Combined fragment, 17.6.3.12 Strict sequencing (strict), 17.6.3.1 Operand of a combined fragment.

Written at the top level and inside alt, else, opt, loop, par, and, break, critical, seq, strict, neg, assert, ignore or consider. Indented below it: msg, create, destroy, activate, deactivate, note, ref, invariant, coregion, alt, opt, loop, par, break, critical, seq, strict, neg, assert, ignore, consider, and.

PartKindValueMeaning
[guard]optional argumenta text in double quotes like "Order service"Condition of the first operand, without brackets; Diagrist adds [...]. UML 2.5.1: 17.6.3.2 Guard of an operand.
id=attributean identifier like api (letters, digits, _ and -, starting with a letter)Name of the frame: a message with this name as an end starts or ends at its edge (a gate of the fragment, f.name names it). UML 2.5.1: 17.4.3.5 Gate on a combined fragment.

Example:

strict
neg [guard] [id=<id>]

An invalid trace: what must not happen. The statements indented below it belong to the fragment; fragments nest. UML 2.5.1: 17.6.3.3 Combined fragment, 17.6.3.13 Invalid traces (neg), 17.6.3.1 Operand of a combined fragment.

Written at the top level and inside alt, else, opt, loop, par, and, break, critical, seq, strict, neg, assert, ignore or consider. Indented below it: msg, create, destroy, activate, deactivate, note, ref, invariant, coregion, alt, opt, loop, par, break, critical, seq, strict, neg, assert, ignore, consider.

PartKindValueMeaning
[guard]optional argumenta text in double quotes like "Order service"Condition of the first operand, without brackets; Diagrist adds [...]. UML 2.5.1: 17.6.3.2 Guard of an operand.
id=attributean identifier like api (letters, digits, _ and -, starting with a letter)Name of the frame: a message with this name as an end starts or ends at its edge (a gate of the fragment, f.name names it). UML 2.5.1: 17.4.3.5 Gate on a combined fragment.

Example:

neg
assert [guard] [id=<id>]

The only valid trace at this point. The statements indented below it belong to the fragment; fragments nest. UML 2.5.1: 17.6.3.3 Combined fragment, 17.6.3.16 Assertion (assert), 17.6.3.1 Operand of a combined fragment.

Written at the top level and inside alt, else, opt, loop, par, and, break, critical, seq, strict, neg, assert, ignore or consider. Indented below it: msg, create, destroy, activate, deactivate, note, ref, invariant, coregion, alt, opt, loop, par, break, critical, seq, strict, neg, assert, ignore, consider.

PartKindValueMeaning
[guard]optional argumenta text in double quotes like "Order service"Condition of the first operand, without brackets; Diagrist adds [...]. UML 2.5.1: 17.6.3.2 Guard of an operand.
id=attributean identifier like api (letters, digits, _ and -, starting with a letter)Name of the frame: a message with this name as an end starts or ends at its edge (a gate of the fragment, f.name names it). UML 2.5.1: 17.4.3.5 Gate on a combined fragment.

Example:

assert
ignore [guard] [id=<id>]

Messages that may appear anywhere and are ignored; the guard lists their names and shows as ignore {...}. The statements indented below it belong to the fragment; fragments nest. UML 2.5.1: 17.6.3.3 Combined fragment, 17.6.3.15 Ignored messages (ignore), 17.6.3.1 Operand of a combined fragment.

Written at the top level and inside alt, else, opt, loop, par, and, break, critical, seq, strict, neg, assert, ignore or consider. Indented below it: msg, create, destroy, activate, deactivate, note, ref, invariant, coregion, alt, opt, loop, par, break, critical, seq, strict, neg, assert, ignore, consider.

PartKindValueMeaning
[guard]optional argumenta text in double quotes like "Order service"Condition of the first operand, without brackets; Diagrist adds [...].
id=attributean identifier like api (letters, digits, _ and -, starting with a letter)Name of the frame: a message with this name as an end starts or ends at its edge (a gate of the fragment, f.name names it). UML 2.5.1: 17.4.3.5 Gate on a combined fragment.

Example:

ignore "ping, status"
consider [guard] [id=<id>]

Only the listed messages are considered; the guard lists their names and shows as consider {...}. The statements indented below it belong to the fragment; fragments nest. UML 2.5.1: 17.6.3.3 Combined fragment, 17.6.3.15 Considered messages (consider), 17.6.3.1 Operand of a combined fragment.

Written at the top level and inside alt, else, opt, loop, par, and, break, critical, seq, strict, neg, assert, ignore or consider. Indented below it: msg, create, destroy, activate, deactivate, note, ref, invariant, coregion, alt, opt, loop, par, break, critical, seq, strict, neg, assert, ignore, consider.

PartKindValueMeaning
[guard]optional argumenta text in double quotes like "Order service"Condition of the first operand, without brackets; Diagrist adds [...].
id=attributean identifier like api (letters, digits, _ and -, starting with a letter)Name of the frame: a message with this name as an end starts or ends at its edge (a gate of the fragment, f.name names it). UML 2.5.1: 17.4.3.5 Gate on a combined fragment.

Example:

consider "order, pay"
duration <from> <to> <text>

A duration constraint between two messages with id=: a bracket from the first to the second, left of the lifeline both touch when there is room, otherwise mirrored to the right or at the left edge. The text is written without braces; Diagrist adds {...}. UML 2.5.1: 8.5.3.2 Duration constraint.

Written at the top level.

PartKindValueMeaning
<from>argumentthe id of a msg or create declared in this diagramThe earlier message.
<to>argumentthe id of a msg or create declared in this diagramThe later message.
<text>argumenta text in double quotes like "Order service"The constraint, without braces.

Example:

duration request response "≤ 300 ms"
time <at> <text>

A time constraint of one message with id=: a tick at its height left of its lifeline or at the left edge, the text in {...}. UML 2.5.1: 8.5.3.2 Time constraint.

Written at the top level.

PartKindValueMeaning
<at>argumentthe id of a msg or create declared in this diagramThe message.
<text>argumenta text in double quotes like "Order service"The constraint, without braces.

Example:

time request "t = now"
adr <id> <question> <equals> <choice> [then] [consequence] [open=<text>]

An architecture decision in the bar below the picture: question, the chosen option after =, and the consequence after =>. mark= with its id puts the mark into the picture.

Written at the top level.

PartKindValueMeaning
<id>argumentan identifier like api (letters, digits, _ and -, starting with a letter)Id of the decision, such as E1; mark=E1 refers to it.
<question>argumenta text in double quotes like "Order service"The question that was decided.
<equals>argumentone of the arrows =Separates the question from the choice.
<choice>argumenta text in double quotes like "Order service"The chosen option.
[then]optional argumentone of the arrows =>Introduces the consequence.
[consequence]optional argumenta text in double quotes like "Order service"What follows from the choice.
open=attributea text in double quotes like "Order service"Who still decides an open question; the card is drawn dashed.

Example:

adr E1 "How do the services coordinate?" = "Events over Kafka" => "No central coordinator"

Besides the codes of the language and the kernel, listed in the overview, the rules of sequence report these. An error stops the build; a warning is printed and the picture is still drawn.

CodeSeverityWhat it checks
U400errorMessage ends and over= lists name declared lifelines. lang checks the other references; these can also be gates, so the plugin checks them. UML 2.5.1: 17.3.3.1 Lifeline.
U401errorInside a fragment, the statements of an operand are indented below its else or and. A statement at the level of the marker after it would silently join the operand above. UML 2.5.1: 17.6.3.1 Operand of a combined fragment.
U403errorA reply --> answers an open synchronous call in the opposite direction; the model pairs them innermost first. UML 2.5.1: 17.4.3.1 Reply to a call, 17.4.3.1 Synchronous call.
U404errorBefore its creation and after its destruction a lifeline does not exist; each happens at most once. UML 2.5.1: 17.4.3.1 Message that creates a lifeline, 17.4.3.4 End of a lifeline (destruction).
U405errordeactivate ends a bar that activate started on the same lifeline. UML 2.5.1: 17.2.3.4 Execution on a lifeline (activation bar).
U408errorA lost message has no receiver, a found one no sender: lost only on the right, found only on the left, both only on a call or asynchronous message, and neither as a lifeline id. UML 2.5.1: 17.4.3.1 Lost message, without receiver, 17.4.3.1 Found message, without sender.
U450errorA gate links a message with the frame of the interaction: gate is no lifeline id and stands at one end of a message only, never with lost, found or a creation. UML 2.5.1: 17.4.3.5 Gate on the frame of the interaction.
U451errorignore and consider name the messages they ignore or consider, written as their guard. UML 2.5.1: 17.6.3.15 Ignored messages (ignore), 17.6.3.15 Considered messages (consider).
U452errorA note and a reference need over=, a state invariant needs on=: they stand on lifelines. UML 2.5.1: 17.2.3.5 State invariant, 17.7.3.1 Use of another interaction (ref).
U453errorA coregion is the short form of a par whose operands hold one event each on the same lifeline; every message in it is sent or received by that lifeline. The tables allow only msg, activate, deactivate and note in it. UML 2.5.1: 17.6.4.10 Coregion, unordered events on one lifeline.
U454errorA gate links a message with the edge of a reference (actual gate) or of a combined fragment. At a reference the message comes from a lifeline outside it and follows it, with only events beside it in between; at a fragment it stands inside. The frame name is its own. UML 2.5.1: 17.4.3.5 Gate on an interaction use, 17.4.3.5 Gate on a combined fragment.
U900warningUML allows alt and par with one operand, but opt or no fragment says it more clearly. UML 2.5.1: 17.6.3.7 Alternatives (alt), 17.6.3.10 Parallel (par).
U901warningUML allows leaving out the reply; it is still named. Exempt are self calls and calls made while the caller handles a call it answers later: that reply implies the inner call returned. Lost and found messages are U907. UML 2.5.1: 17.4.3.1 Synchronous call, 17.4.3.1 Reply to a call.
U902warningA lifeline no message, note or reference touches says nothing; remove it or add what it does. UML 2.5.1: 17.3.3.1 Lifeline.
U903warningAn operand without events draws an empty band; fill it or remove it. UML 2.5.1: 17.6.3.1 Operand of a combined fragment.
U904warningIn alt every operand but the last needs a guard; the last one may stand for [else]. UML 2.5.1: 17.6.3.7 Alternatives (alt), 17.6.3.2 Guard of an operand.
U905warningactivate without deactivate: the bar reaches to the end of the diagram. UML 2.5.1: 17.2.3.4 Execution on a lifeline (activation bar).
U906warningA duration runs from the earlier to the later message; swapped, Diagrist still draws it. UML 2.5.1: 8.5.3.2 Duration constraint.
U907warningNo reply can follow a lost or found message, so as a synchronous call it would wait forever; use ~>. UML 2.5.1: 17.4.3.1 Lost message, without receiver, 17.4.3.1 Found message, without sender, 17.4.3.1 Synchronous call.
U908warningduration= slopes the arrow. A self call is a loop and a creation ends at the head at its height: there the arrow stays level and the duration is missing from the picture. UML 2.5.1: 8.5.3.2 Duration constraint.
U909warningA coregion with fewer than two messages leaves no order open and says nothing. UML 2.5.1: 17.6.4.10 Coregion, unordered events on one lifeline.
U950warningid= on a reference or fragment only serves gates; without a message at its edge it has no effect. UML 2.5.1: 17.4.3.5 Gate on an interaction use, 17.4.3.5 Gate on a combined fragment.
U951warningA gate is a point on the frame with one message per side; two messages through the same named gate in the same direction leave open which one is meant. UML 2.5.1: 17.4.3.5 Gate on the frame of the interaction, 17.4.3.5 Gate on an interaction use, 17.4.3.5 Gate on a combined fragment.