Elements of sequence diagrams
| Element | Syntax |
|---|---|
| Lifeline | participant, actor |
| Message | a -> b, a ->> b, a --> b, [-> a, a ->] |
| Execution | a -> b : call { ... }, return |
| Creation and destruction | a -> new "B" as b, create, destroy |
| Combined fragment | alt, opt, loop, break, critical, neg, par |
| Interaction use | ref over a, b : Name |
| Note | note over a: text |
diagram sequence "All the sequence elements"
actor User as u
participant Server as s
u -> s : request() {
opt "cached" {
return hit
}
s -> new "Worker" as w : start
destroy w
return result
}
note over s: Stateless.
See Sequence diagrams for how to write one.