Serea

Playground

Sequence diagram

Syntax

Participants

Each participant is defined asID[LABEL]the first time it appears. And only asIDin subsequent appearances.

A[Alice] -> B[Bob]: Hello Bob!
B --> A: Hello stranger

In the code above the participants are defined asA[Alice]andB[Bob]on the first line. And only asAandBafter that.

Sequences

Sequences are defined on every line, in chronological order. A sequence is defined asPARTICIPANT1 ARROW PARTICIPANT2: LABEL.

WherePARTICIPANT1andPARTICIPANT2are defined either asID[LABEL]orID(see "participant" section above).

The arrow is either->for a plain arrow,-->for a dashed arrow or..>for a dotted arrow.

The label is optional and MUST be preceded by:.

If a sequence only involves one participant, it is defined asPARTICIPANT: LABEL.