A Sequence Diagram shows a conversation between parts of a system: participants side by side over dashed lifelines, and a row for each message, top to bottom in the order they happen. It is one element: you type the messages and it draws the arrows, bars and loops.
It sits in the palette's Build category, after Flowchart.
Take the tour
The first time you select a sequence diagram, a small Tour toolbar appears beside its toolbar. Press Play for a short tour on your own diagram: how it reads, then the Sequence Diagram dialog, opened for you: the participants, the messages and their arrows, Add Message, the Text tab, the preview and Numbered. Done closes the dialog with the tour. Press the cross if you would rather not; either way it is not offered again. To be offered it again, open Settings, then Tours, open Element Tours and switch Sequence Tour back on.
Editing it
Double-click the diagram, or right-click it and choose Edit Sequence in its Sequence section. The Sequence Diagram dialog opens with a live preview beside the rows (above them on a phone, where the dialog rises from the bottom).
Participants run along the top, left to right. Click one to rename it, switch it between a Box and an Actor (a stick figure), move it left or right, or remove it (its messages go with it). Add Participant adds another. A diagram has 2 to 12 participants.
Messages are numbered rows, top to bottom. Each has a From, a To and its words, and between From and To a button drawn as the arrow it makes. Click the arrow to change its kind:
- Call: a solid line with a filled head.
- Async: a solid line with an open head, for a message nobody waits for.
- Reply: a dashed line.
Press Enter in a message's words to add the next message under it, from that message's receiver to the next participant along, so you can type a whole conversation straight down. Backspace in an empty message removes it. Pick the same participant as From and To for a message it sends itself, drawn as a loop.
A call that is later answered by a reply draws an activation bar on the participant while it works.
Writing it as text
The Text tab shows the whole diagram as lines you can edit or paste:
participant APIoractor Customersets the order (optional; any name a message uses is added).From -> To: wordsis a call,From ~> To: wordsis async andFrom --> To: wordsis a reply.- Lines starting with
//are notes.
A line it can't read is named under the box, and nothing else is lost. Switch back to Messages to see the rows.
Options
- Numbered (in the menu, or at the foot of the dialog) puts each message's number in front of it ("1: Place order"), so a review can say "step 4".
- Play (right-click, then Animation) reveals the diagram top to bottom, so the messages appear in the order they happen. Set its speed, and turn on Repeat to loop it.
Resizing the diagram scales the drawing, keeping its shape.
Was this article helpful?