This is the old Activity Diagram (legacy) syntax, to see the new current version see: Activity Diagram (new).
Einfache Aktivität
Mit (*) kann der Startknoten und der Endknoten des Aktivitätsdiagramms festgelegt werden.
In einigen Fällen kann man (*top) verwendet um den Startpunkt an den Anfang des Diagramms zu verlegen.
mit --> können Pfeile definiert werden.
You can use (*) for the starting point and ending point of
the activity diagram.
In some occasion, you may want to use (*top) to force the starting point to be at the top of the diagram.
Use --> for arrows.
Ein Pfeil beginnt automatisch an der zuletzt verwendeten Aktivität.
Pfeile lassen sich beschriften in dem man den Text für die Beschriftung in eckige Klammern ( [ und ] )
direkt hinter die Definition des Pfeils schreibt.
@startuml
(*) --> "First Activity"
-->[You can put also labels] "Second Activity"
--> (*)
@enduml
Label on arrows
By default, an arrow starts at the last used activity.
You can put a label on an arrow using brackets [ and
] just after the arrow definition.
@startuml
(*) --> "First Action"
-->[You can put also labels] "Second Action"
--> (*)
@enduml
Pfeilrichtung ändern
Mit dem Symbol -> kann ein waagerechter Pfeil erstellt werden. Mann kann die Richtung der Pfeile
auch mit der folgenden Syntax beeinflussen:
Unfortunately, you will have to sometimes repeat the same activity in the diagram text:
@startuml
(*) --> "check input"
If "input is verbose" then
--> [Yes] "turn on verbosity"
--> "run command"
else
--> "run command"
Endif
-->(*)
@enduml
Mehr über Verzweigungen
Normalerweise ist ein eine Verzweigung mit der zuletzt definierten Aktivität verbunden.
Mit dem if Schlüsselwort ist es aber möglich,
diese Voreinstellung zu überschreiben.
Außerdem kann man Verzweigungen auch schachteln.
@startuml
(*) --> if "Some Test" then
-->[true] "activity 1"
if "" then
-> "activity 3" as a3
else
if "Other test" then
-left-> "activity 5"
else
--> "activity 6"
endif
endif
else
->[false] "activity 2"
endif
a3 --> if "last test" then
--> "activity 7"
else
-> "activity 8"
endif
@enduml
More on Branches
By default, a branch is connected to the last defined activity, but it
is possible to override this and to define a link with the if keywords.
It is also possible to nest branches.
@startuml
(*) --> if "Some Test" then
-->[true] "action 1"
if "" then
-> "action 3" as a3
else
if "Other test" then
-left-> "action 5"
else
--> "action 6"
endif
endif
else
->[false] "action 2"
endif
a3 --> if "last test" then
--> "action 7"
else
-> "action 8"
endif
@enduml
Synchronisation
Mit === code === können Synchronisationsbalken erzeugt werden.
Die Beschreibung einer Aktivität kann sich auch über mehrere Zeilen erstrecken.
Mit dem \n Symbol kann ein Zeilenvorschub in die Beschreibung eingefügt werden.
Außerdem kann man HTML Tags verwenden. Hier ein Beispiel:
Mit dem Schlüsselwort as kann man auch eine kurze Kodierung zur Aktivität hinzufügen.
Diese Kodierung kann später in der Diagrammbeschreibung verwendet werden.
@startuml
(*) -left-> "this <size:20>activity</size>
is <b>very</b> <color:red>long2</color>
and defined on several lines
that contains many <i>text</i>" as A1
-up-> "Another activity\n on several lines"
A1 --> "Short activity <img:sourceforge.jpg>"
@enduml
WARNING
This translation need to be updated.
WARNING
Long action description
When you declare activities, you can span on several lines the
description text. You can also add \n in the description.
You can also give a short code to the activity with the as
keyword.
This code can be used latter in the diagram description.
@startuml
(*) -left-> "this <size:20>action</size>
is <b>very</b> <color:red>long2</color>
and defined on several lines
that contains many <i>text</i>" as A1
-up-> "Another action\n on several lines"
A1 --> "Short action <img:sourceforge.jpg>"
@enduml
Notizen
Mit den folgenden Befehlen können einer Aktivität Notizen zugeordnet werden:
note left,
note right, note top or note bottom,
Gleich nach der Beschreibung der Aktivität die man festhalten will.
Wenn Sie eine Notiz für den Startpunkt erstellen wollen müssen Sie diese Notiz ganz am
Anfang des Diagramms definieren.
Es ist auch möglich, eine Notiz mit mehreren Zeilen zu erstellen. Dazu werden die end note Schlüsselworte verwendet.
@startuml
(*) --> "Some Activity"
note right: This activity has to be defined
"Some Activity" --> (*)
note left
This note is on
several lines
end note
@enduml
Notes
You can add notes on a activity using the commands
note left,
note right, note top or note bottom,
just after the description of the activity you want to note.
If you want to put a note on the starting point, define the note
at the very beginning of the diagram description.
You can also have a note on several lines, using the
endnote keywords.
@startuml
(*) --> "Some action"
note right: This action has to be defined
"Some action" --> (*)
note left
This note is on
several lines
end note
@enduml
Partitionen
Partitionen können mit dem partition Schlüsselwort erzeugt werden. Dabei kann
auch eine Hintergrundfarbe festgelegt werden.(Duch einen HTML Farbcode oder Namen).
Neue Aktivitäten werden automatisch in die zuletzt verwendete Partition eingefügt.
Eine Partition lässt sich über das end partition Schlüsselwort schließen.
You can define a partition using the partition keyword, and
optionally declare a background color for your partition (Using a html
color code or name)
When you declare activities, they are automatically put in the
last used partition.
You can close the partition definition using a closing bracket }.