blob: 2e4b71e875ac7127f7bf24e5198dc0f6f1a6d7c5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#resource
---
**ZenUML**
Optional **Title**
**Participants** can be declared when used or at the start.
**Annotators** give **participants** a special icon, defined at the doc site.
**Aliases** give a short **participant** name a more descriptive name when rendered, e.g: A as Alice <- Alice will be rendered, but the code can use A.
**Messages** between **participants** can be **sync, async, creation or reply**.
**Sync** use A.\<MessageName\> have a block {} for nested messages
**Async** use an arrow A->B: How are you?
**Creation** new keyword new A(optional params)
**Reply** three ways to define:
* Assign var from **Sync** message, e.g: OptionalType a = A.SyncMessage()
* Return A.SyncMessage { return blaat }
* @return or @reply on an **async** message
**Nesting** can be done on both creation and sync messages using blocks {}.
**Comments** can be added using `// comment` and support markdown.
**Loops** can be defined using keywords: **while, for, foreach and loop**.
**Alternative** paths can be sequenced using **if, else** statements. if(blaat) { A.syncMessage(B) }
**Opt** fragments rendered via `opt { ... }`. This can be useful for optional responses or paths.
**Parallel** paths can be defined using `par { ... }`.
**Try/catch/finally** statements are supported as well.
**@Starter(participant)** to make the line start from a **participant**
|