Merlive

Sequence diagrams

Not boxes and links, so it has seven rules of its own: participants in one row an even step apart, one message to a row, words off every lifeline. Its page goes through the messages one at a time.

Declared with sequenceDiagram. Of 42 features Mermaid documents for a sequence diagram, 40 drawn as written, 2 drawn less something. See all 42 drawn both ways, or draw one yourself.

Mermaid
Sequence diagram, as Mermaid draws it
Merlive
Sequence diagram, as Merlive draws it

What is read

A block that starts sequenceDiagram is read, placed and checked by rules of its own (S1 to S7, with D1 and D2).

WrittenRead as
participant B as Buyer, actor B, or a name first met in a messageWho is in it, left to right in the order named. An actor is a figure with its name under it; @{ "type": … } is a drawing of its own for boundary, control, entity, database (the data kind), collections and queue. Each is drawn again at the foot of its lifeline, unless mirrorActors: false is in the front matter or a directive
A->B, A-->B, A->>B, A-->>B, A<<->>B, A-xB, A-)BA message: solid or dotted, with nothing, an arrowhead, an arrowhead at both ends, a cross or an open arrow
A-|\B, A-|/B, A-\\B, A-//B, dotted with --, reversed as A/|-B, A\|-B, A//-B, A\\-BA message with half an arrowhead, or one stroke of an open one, above or below its line as written. A reversed one is drawn, and read, back to the participant named first
A->>()B, A()->>B, A()->>()BA message that meets the middle of a lifeline, in a dot at that end
A->>A: wordsA message to itself: a loop to the right
A->>+B, B-->>-A, activate B, deactivate BA bar on a participant at work; a second on the same one sits beside the first
Note right of A: …, Note left of A: …, Note over A: …, Note over A,B: …A note, on a row of its own
loop, alt / else, opt, par / and, critical / option, break … endA frame round its rows, named, one inside another
rect rgb(…) … endA highlight behind its rows, in the design's own colour nearest the one written (any CSS colour), thinly; with no colour, or a grey, in the design's tint
box Aqua Buying … endA group of participants, framed, its title inside the frame above them and wrapped to it, in the design's own colour nearest the one written, as a highlight is
create participant J, destroy JA participant that starts at the message that makes it, and ends in a cross
autonumber, autonumber 10 5Each message numbered, from a start and by a step
title: …, accTitle, accDescr, front matter, %% comments, <br/>, #9829;As in a flowchart
link A: … @ url, links A: {…}Read past: a page of Merlive opens no links

A line that is none of these is named in a note, line with its number, and nothing is drawn from it. There are no %% lines of Merlive's own for a sequence: its page goes through the messages in order without being told.

Feature by feature

Every feature Mermaid’s own pages set out for a sequence diagram, each with a sample of it in the corpus. A sample is drawn when every box, link and word it has is read and every rule passes. Drawn, less something is the same with one thing known to be missing, named beside it.

FeatureResultWhat is missing
Participants named by the messages they are inDrawn
Participants declared, in an order of their ownDrawn
Actors: people, not systemsDrawn
A participant with a type: boundary, control, entity, database, collections, queueDrawn
A participant with a short id and a name, written with "as"Drawn
A name written inside the bracesDrawn
A name inside the braces and another after "as": the one after "as" winsDrawn
A participant made part way down, and one endedDrawn
Participants grouped in boxes, with and without a colour and a titleDrawn
A message with no arrowhead, solid and dottedDrawn
A message with an arrowhead, solid and dottedDrawn
A message with an arrowhead at both endsDrawn
A message that ends in a crossDrawn
A message that does not wait: an open arrowDrawn
A message from a participant to itselfDrawn
Half arrowsDrawn
A message to or from the middle of a lineDrawn
A participant at work, written with activate and deactivateDrawn
A participant at work, written with + and -Drawn
A participant at work twice at onceDrawn
A note to the right or the left of a participantDrawn
A note over a participantDrawn
A note over two participantsDrawn
A line break in a message, a note and a nameDrawn
A loopDrawn
One way or another: alt and elseDrawn
Something that may not happen: optDrawn
Things done at once: par and andDrawn
A block inside a blockDrawn
What must happen, and what to do when it cannot: critical and optionDrawn
A critical block with no optionsDrawn
Where the sequence stops: breakDrawn
Rows highlighted with a coloured background, one inside anotherDrawn
Comments on lines of their ownDrawn
Characters written as entity codesDrawn
Messages numberedDrawn
Messages numbered from a start, by a stepDrawn
A menu of links on a participantDrawn, less somethingThe menus are left out: a page of Merlive opens no links
A title in the diagramDrawn
A title and a description for readers who cannot see itDrawn
Statements parted by semicolonsDrawn
A title and settings in front matterDrawn, less somethingMermaid's own settings are read past: the look and the numbering are the design's and the diagram's own

Written from skills/merlive/reference.md in the repository, so the two cannot disagree.

Before: PacketsNext: Notes, steps and the main path