This a documentation on how to use KangaModeling. For documentation on how to contribute to KangaModeling please refer to the
Kanga Sequence Markup Tutorial
The "language" we use to describe sequence diagrams is based on markup used by
http://www.websequencediagrams.com. It is very compact and simple, therefore the compromise made is that the language has no formal syntax and can not be formalized in terms of EBNF.
Using Kanga.Sequence you must not care about layout of diagram. You just describe lifelines, calls, operators and the tool chooses optimal alignment for you.
There are two kinds of signals call
A->B and return B-->A.
Note that you can skip lifeline declarations using participant statement if you used a signal statement.
Order of Lifelines
Order of lifelines is defined by order of their occurring in code. Nevertheless you can enforce different order by declaring them in explicit order using participant statement.
Usually a call leads to lifeline activation. Nevertheless sometimes it is more relevant to show communication between components, thus we decided to provide dedicated statements for
activation and deactivation.
Note that self calls and activations are also supported:
Lifeline Alias participant Long name as A
Sometimes you want to give a lifline some descriptive name. It might be long and boring to type it again and again when using in code. So you are able to create an alias using
participant Some component with long name as A
title Diagram 1
A->B : call
B-->A : return
Use \n to enforce the line break.
title Title line 1\n line 2
participant A line 1\n line 2 as A
A->A : call line 1\n line 2
Some characters like '>', '<, ':' might be ambiguous. Use parentheses to escape them.
"Escaped : name A "-> "Escaped : name B"
Currently we support 3 operators alt, opt, loop.
Operators may contain any number of interactions and must terminate with
end statement. Nested operators are also supported.
loop from 1 to 100
Alt statement can have any number of else sections.
Dispose or Destroy of Lifeline
Usually a lifeline starts at the top of diagram end ends at the very bottom. End of the lifeline is indicated by cross at the end of the vertical line. Using
dispose or destroy statement (they are synonyms - there is no semantic difference between them) you can end the lifeline earlier.
Note that accessing a disposed lifeline (using it in signal or activation) is not allowed.