<Keyword>zenuml</Keyword><br/>
<Normal>    </Normal><Keyword>title</Keyword><Text> Demo</Text><br/>
<Normal></Normal><br/>
<Normal>    </Normal><Node>Alice</Node><br/>
<Normal></Normal><br/>
<Normal>    </Normal><Annotation>@Database</Annotation><Normal> </Normal><Node>Bob</Node><br/>
<Normal>    </Normal><br/>
<Normal>    </Normal><Node>J</Node><Normal> </Normal><Keyword Parameter>as</Keyword Parameter><Normal> </Normal><Node>John</Node><br/>
<Normal></Normal><br/>
<Normal>    </Normal><Node>A</Node><Link>.</Link><Link Text>SyncMessage</Link Text><br/>
<Normal>    </Normal><Node>A</Node><Link>.</Link><Link Text>SyncMessage(with, parameters) </Link Text><Curly Bracket Block Delimiter>{</Curly Bracket Block Delimiter><br/>
<Normal>      </Normal><Node>B</Node><Link>.</Link><Link Text>nestedSyncMessage()</Link Text><br/>
<Normal>    </Normal><Curly Bracket Block Delimiter>}</Curly Bracket Block Delimiter><br/>
<Normal></Normal><br/>
<Normal>    </Normal><Keyword>new</Keyword><Normal> </Normal><Node>A1</Node><br/>
<Normal>    </Normal><Keyword>new</Keyword><Normal> </Normal><Node>A2</Node><Link>(</Link><Link Text>with, parameters</Link Text><Link>)</Link><br/>
<Normal></Normal><br/>
<Normal>    </Normal><Diagram Comment>// 1. assign a variable from a sync message.</Diagram Comment><br/>
<Normal>    </Normal><Node>a = A</Node><Link>.</Link><Link Text>SyncMessage()</Link Text><br/>
<Normal></Normal><br/>
<Normal>    </Normal><Diagram Comment>// 1.1. optionally give the variable a type</Diagram Comment><br/>
<Normal>    </Normal><Node>SomeType a = A</Node><Link>.</Link><Link Text>SyncMessage()</Link Text><br/>
<Normal></Normal><br/>
<Normal>    </Normal><Diagram Comment>// 2. use return keyword</Diagram Comment><br/>
<Normal>    </Normal><Node>A</Node><Link>.</Link><Link Text>SyncMessage() </Link Text><Curly Bracket Block Delimiter>{</Curly Bracket Block Delimiter><br/>
<Normal>      </Normal><Keyword>return</Keyword><Text> result</Text><br/>
<Normal>    </Normal><Curly Bracket Block Delimiter>}</Curly Bracket Block Delimiter><br/>
<Normal></Normal><br/>
<Normal>    </Normal><Diagram Comment>// 3. use @return or @reply annotator on an async message</Diagram Comment><br/>
<Normal>    </Normal><Annotation>@return</Annotation><br/>
<Normal>    </Normal><Node>A</Node><Link>-></Link><Node>B</Node><Node Separator>:</Node Separator><Link Text> result</Link Text><br/>
<Normal>    </Normal><br/>
<Normal>    </Normal><Node>Client</Node><Link>-></Link><Node>A</Node><Link>.</Link><Link Text>method() </Link Text><Curly Bracket Block Delimiter>{</Curly Bracket Block Delimiter><br/>
<Normal>      </Normal><Node>B</Node><Link>.</Link><Link Text>method() </Link Text><Curly Bracket Block Delimiter>{</Curly Bracket Block Delimiter><br/>
<Normal>        </Normal><Node>if</Node><Link>(</Link><Link Text>condition</Link Text><Link>)</Link><Normal> </Normal><Curly Bracket Block Delimiter>{</Curly Bracket Block Delimiter><br/>
<Normal>          </Normal><Keyword>return</Keyword><Text> x1</Text><br/>
<Normal>          </Normal><Diagram Comment>// return early</Diagram Comment><br/>
<Normal>          </Normal><Annotation>@return</Annotation><br/>
<Normal>          </Normal><Node>A</Node><Link>-></Link><Node>Client</Node><Node Separator>:</Node Separator><Link Text> x11</Link Text><br/>
<Normal>        </Normal><Curly Bracket Block Delimiter>}</Curly Bracket Block Delimiter><br/>
<Normal>      </Normal><Curly Bracket Block Delimiter>}</Curly Bracket Block Delimiter><br/>
<Normal>      </Normal><Keyword>return</Keyword><Text> x2</Text><br/>
<Normal>    </Normal><Curly Bracket Block Delimiter>}</Curly Bracket Block Delimiter><br/>
<Normal></Normal><br/>
<Normal>    </Normal><Diagram Comment>// a comment on a message.</Diagram Comment><br/>
<Normal>    </Normal><Diagram Comment>// </Diagram Comment><Special Text Char>**</Special Text Char><Diagram Comment>Markdown</Diagram Comment><Special Text Char>**</Special Text Char><Diagram Comment> is supported.</Diagram Comment><br/>
<Normal>    </Normal><Node>BookService</Node><Link>.</Link><Link Text>getBook()</Link Text><br/>
<Normal></Normal><br/>
<Normal>    </Normal><Node>while</Node><Link>(</Link><Link Text>true</Link Text><Link>)</Link><Normal> </Normal><Curly Bracket Block Delimiter>{</Curly Bracket Block Delimiter><br/>
<Normal>      </Normal><Node>John</Node><Link>-></Link><Node>Alice</Node><Node Separator>:</Node Separator><Link Text> Great!</Link Text><br/>
<Normal>    </Normal><Curly Bracket Block Delimiter>}</Curly Bracket Block Delimiter><br/>
<Normal></Normal><br/>
<Normal>    </Normal><Node>if</Node><Link>(</Link><Link Text>is_sick</Link Text><Link>)</Link><Normal> </Normal><Curly Bracket Block Delimiter>{</Curly Bracket Block Delimiter><br/>
<Normal>      </Normal><Node>Bob</Node><Link>-></Link><Node>Alice</Node><Node Separator>:</Node Separator><Link Text> Not so good :(</Link Text><br/>
<Normal>    </Normal><Curly Bracket Block Delimiter>}</Curly Bracket Block Delimiter><Normal> </Normal><Keyword>else</Keyword><Normal> </Normal><Curly Bracket Block Delimiter>{</Curly Bracket Block Delimiter><br/>
<Normal>      </Normal><Node>Bob</Node><Link>-></Link><Node>Alice</Node><Node Separator>:</Node Separator><Link Text> Feeling fresh like a daisy</Link Text><br/>
<Normal>    </Normal><Curly Bracket Block Delimiter>}</Curly Bracket Block Delimiter><br/>
<Normal></Normal><br/>
<Normal>    </Normal><Keyword>opt</Keyword><Normal> </Normal><Curly Bracket Block Delimiter>{</Curly Bracket Block Delimiter><br/>
<Normal>      </Normal><Node>Bob</Node><Link>-></Link><Node>Alice</Node><Node Separator>:</Node Separator><Link Text> Thanks for asking</Link Text><br/>
<Normal>    </Normal><Curly Bracket Block Delimiter>}</Curly Bracket Block Delimiter><br/>
<Normal></Normal><br/>
<Normal>    </Normal><Keyword>par</Keyword><Normal> </Normal><Curly Bracket Block Delimiter>{</Curly Bracket Block Delimiter><br/>
<Normal>      </Normal><Node>Alice</Node><Link>-></Link><Node>John</Node><Node Separator>:</Node Separator><Link Text> Hello guys!</Link Text><br/>
<Normal>    </Normal><Curly Bracket Block Delimiter>}</Curly Bracket Block Delimiter><br/>
<Normal>    </Normal><br/>
<Normal>    </Normal><Keyword>try</Keyword><Normal> </Normal><Curly Bracket Block Delimiter>{</Curly Bracket Block Delimiter><br/>
<Normal>      </Normal><Node>Consumer</Node><Link>-></Link><Node>API</Node><Node Separator>:</Node Separator><Link Text> Book something</Link Text><br/>
<Normal>      </Normal><Node>API</Node><Link>-></Link><Node>BookingService</Node><Node Separator>:</Node Separator><Link Text> Start booking process</Link Text><br/>
<Normal>    </Normal><Curly Bracket Block Delimiter>}</Curly Bracket Block Delimiter><Normal> </Normal><Keyword>catch</Keyword><Normal> </Normal><Curly Bracket Block Delimiter>{</Curly Bracket Block Delimiter><br/>
<Normal>      </Normal><Node>API</Node><Link>-></Link><Node>Consumer</Node><Node Separator>:</Node Separator><Link Text> show failure</Link Text><br/>
<Normal>    </Normal><Curly Bracket Block Delimiter>}</Curly Bracket Block Delimiter><Normal> </Normal><Keyword>finally</Keyword><Normal> </Normal><Curly Bracket Block Delimiter>{</Curly Bracket Block Delimiter><br/>
<Normal>      </Normal><Node>API</Node><Link>-></Link><Node>BookingService</Node><Node Separator>:</Node Separator><Link Text> rollback status</Link Text><br/>
<Normal>    </Normal><Curly Bracket Block Delimiter>}</Curly Bracket Block Delimiter><br/>
