PlantUML syntax examples

These are examples taken from the official documentation: https://plantuml.com/ Generated by Plantuml syntax Test.

Arrows LR

@startuml
Bob -> Alice
Bob ->o Alice
Bob ->x Alice
Bob --> Alice
Bob -->o Alice
Bob -->x Alice
Bob ->> Alice
Bob ->>o Alice
Bob ->>x Alice
Bob -->> Alice
Bob -->>o Alice
Bob -->>x Alice
Bob -\ Alice
Bob -\o Alice
Bob -\x Alice
Bob --\ Alice
Bob --\o Alice
Bob --\x Alice
Bob -\\ Alice
Bob -\\o Alice
Bob -\\x Alice
Bob --\\ Alice
Bob --\\o Alice
Bob --\\x Alice
Bob -/ Alice
Bob -/o Alice
Bob -/x Alice
Bob --/ Alice
Bob --/o Alice
Bob --/x Alice
Bob -// Alice
Bob -//o Alice
Bob -//x Alice
Bob --// Alice
Bob --//o Alice
Bob --//x Alice
@enduml
BobBobAliceAlice

Arrows RL

@startuml
Bob <- Alice
Bob o<- Alice
Bob x<- Alice
Bob <-- Alice
Bob o<-- Alice
Bob x<-- Alice
Bob <<- Alice
Bob o<<- Alice
Bob x<<- Alice
Bob <<-- Alice
Bob o<<-- Alice
Bob x<<-- Alice
Bob \- Alice
Bob o\- Alice
Bob x\- Alice
Bob \-- Alice
Bob o\-- Alice
Bob x\-- Alice
Bob \\- Alice
Bob o\\- Alice
Bob x\\- Alice
Bob \\-- Alice
Bob o\\-- Alice
Bob x\\-- Alice
Bob /- Alice
Bob o/- Alice
Bob x/- Alice
Bob /-- Alice
Bob o/-- Alice
Bob x/-- Alice
Bob //- Alice
Bob o//- Alice
Bob x//- Alice
Bob //-- Alice
Bob o//-- Alice
Bob x//-- Alice
@enduml
BobBobAliceAlice

Arrows both

@startuml
Bob <->    Alice
Bob o<->   Alice
Bob x<->   Alice
Bob <-->   Alice
Bob o<-->  Alice
Bob x<-->  Alice
Bob <<->   Alice
Bob o<<->  Alice
Bob x<<->  Alice
Bob <<-->  Alice
Bob o<<--> Alice
Bob x<<--> Alice
Bob \->    Alice
Bob o\->   Alice
Bob x\->   Alice
Bob \-->   Alice
Bob o\-->  Alice
Bob x\-->  Alice
Bob \\->   Alice
Bob o\\->  Alice
Bob x\\->  Alice
Bob \\-->  Alice
Bob o\\--> Alice
Bob x\\--> Alice
Bob /->    Alice
Bob o/->   Alice
Bob x/->   Alice
Bob /-->   Alice
Bob o/-->  Alice
Bob x/-->  Alice
Bob //->   Alice
Bob o//->  Alice
Bob x//->  Alice
Bob //-->  Alice
Bob o//--> Alice
Bob x//--> Alice

Bob <->o    Alice
Bob o<->o   Alice
Bob x<->o   Alice
Bob <-->o   Alice
Bob o<-->o  Alice
Bob x<-->o  Alice
Bob <<->o   Alice
Bob o<<->o  Alice
Bob x<<->o  Alice
Bob <<-->o  Alice
Bob o<<-->o Alice
Bob x<<-->o Alice
Bob \->o    Alice
Bob o\->o   Alice
Bob x\->o   Alice
Bob \-->o   Alice
Bob o\-->o  Alice
Bob x\-->o  Alice
Bob \\->o   Alice
Bob o\\->o  Alice
Bob x\\->o  Alice
Bob \\-->o  Alice
Bob o\\-->o Alice
Bob x\\-->o Alice
Bob /->o    Alice
Bob o/->o   Alice
Bob x/->o   Alice
Bob /-->o   Alice
Bob o/-->o  Alice
Bob x/-->o  Alice
Bob //->o   Alice
Bob o//->o  Alice
Bob x//->o  Alice
Bob //-->o  Alice
Bob o//-->o Alice
Bob x//-->o Alice

Bob <->x    Alice
Bob o<->x   Alice
Bob x<->x   Alice
Bob <-->x   Alice
Bob o<-->x  Alice
Bob x<-->x  Alice
Bob <<->x   Alice
Bob o<<->x  Alice
Bob x<<->x  Alice
Bob <<-->x  Alice
Bob o<<-->x Alice
Bob x<<-->x Alice
Bob \->x    Alice
Bob o\->x   Alice
Bob x\->x   Alice
Bob \-->x   Alice
Bob o\-->x  Alice
Bob x\-->x  Alice
Bob \\->x   Alice
Bob o\\->x  Alice
Bob x\\->x  Alice
Bob \\-->x  Alice
Bob o\\-->x Alice
Bob x\\-->x Alice
Bob /->x    Alice
Bob o/->x   Alice
Bob x/->x   Alice
Bob /-->x   Alice
Bob o/-->x  Alice
Bob x/-->x  Alice
Bob //->x   Alice
Bob o//->x  Alice
Bob x//->x  Alice
Bob //-->x  Alice
Bob o//-->x Alice
Bob x//-->x Alice

Bob <->>    Alice
Bob o<->>   Alice
Bob x<->>   Alice
Bob <-->>   Alice
Bob o<-->>  Alice
Bob x<-->>  Alice
Bob <<->>   Alice
Bob o<<->>  Alice
Bob x<<->>  Alice
Bob <<-->>  Alice
Bob o<<-->> Alice
Bob x<<-->> Alice
Bob \->>    Alice
Bob o\->>   Alice
Bob x\->>   Alice
Bob \-->>   Alice
Bob o\-->>  Alice
Bob x\-->>  Alice
Bob \\->>   Alice
Bob o\\->>  Alice
Bob x\\->>  Alice
Bob \\-->>  Alice
Bob o\\-->> Alice
Bob x\\-->> Alice
Bob /->>    Alice
Bob o/->>   Alice
Bob x/->>   Alice
Bob /-->>   Alice
Bob o/-->>  Alice
Bob x/-->>  Alice
Bob //->>   Alice
Bob o//->>  Alice
Bob x//->>  Alice
Bob //-->>  Alice
Bob o//-->> Alice
Bob x//-->> Alice

Bob <->>o    Alice
Bob o<->>o   Alice
Bob x<->>o   Alice
Bob <-->>o   Alice
Bob o<-->>o  Alice
Bob x<-->>o  Alice
Bob <<->>o   Alice
Bob o<<->>o  Alice
Bob x<<->>o  Alice
Bob <<-->>o  Alice
Bob o<<-->>o Alice
Bob x<<-->>o Alice
Bob \->>o    Alice
Bob o\->>o   Alice
Bob x\->>o   Alice
Bob \-->>o   Alice
Bob o\-->>o  Alice
Bob x\-->>o  Alice
Bob \\->>o   Alice
Bob o\\->>o  Alice
Bob x\\->>o  Alice
Bob \\-->>o  Alice
Bob o\\-->>o Alice
Bob x\\-->>o Alice
Bob /->>o    Alice
Bob o/->>o   Alice
Bob x/->>o   Alice
Bob /-->>o   Alice
Bob o/-->>o  Alice
Bob x/-->>o  Alice
Bob //->>o   Alice
Bob o//->>o  Alice
Bob x//->>o  Alice
Bob //-->>o  Alice
Bob o//-->>o Alice
Bob x//-->>o Alice

Bob <->>x    Alice
Bob o<->>x   Alice
Bob x<->>x   Alice
Bob <-->>x   Alice
Bob o<-->>x  Alice
Bob x<-->>x  Alice
Bob <<->>x   Alice
Bob o<<->>x  Alice
Bob x<<->>x  Alice
Bob <<-->>x  Alice
Bob o<<-->>x Alice
Bob x<<-->>x Alice
Bob \->>x    Alice
Bob o\->>x   Alice
Bob x\->>x   Alice
Bob \-->>x   Alice
Bob o\-->>x  Alice
Bob x\-->>x  Alice
Bob \\->>x   Alice
Bob o\\->>x  Alice
Bob x\\->>x  Alice
Bob \\-->>x  Alice
Bob o\\-->>x Alice
Bob x\\-->>x Alice
Bob /->>x    Alice
Bob o/->>x   Alice
Bob x/->>x   Alice
Bob /-->>x   Alice
Bob o/-->>x  Alice
Bob x/-->>x  Alice
Bob //->>x   Alice
Bob o//->>x  Alice
Bob x//->>x  Alice
Bob //-->>x  Alice
Bob o//-->>x Alice
Bob x//-->>x Alice

Bob <-\    Alice
Bob o<-\   Alice
Bob x<-\   Alice
Bob <--\   Alice
Bob o<--\  Alice
Bob x<--\  Alice
Bob <<-\   Alice
Bob o<<-\  Alice
Bob x<<-\  Alice
Bob <<--\  Alice
Bob o<<--\ Alice
Bob x<<--\ Alice
Bob \-\    Alice
Bob o\-\   Alice
Bob x\-\   Alice
Bob \--\   Alice
Bob o\--\  Alice
Bob x\--\  Alice
Bob \\-\   Alice
Bob o\\-\  Alice
Bob x\\-\  Alice
Bob \\--\  Alice
Bob o\\--\ Alice
Bob x\\--\ Alice
Bob /-\    Alice
Bob o/-\   Alice
Bob x/-\   Alice
Bob /--\   Alice
Bob o/--\  Alice
Bob x/--\  Alice
Bob //-\   Alice
Bob o//-\  Alice
Bob x//-\  Alice
Bob //--\  Alice
Bob o//--\ Alice
Bob x//--\ Alice

Bob <-\o    Alice
Bob o<-\o   Alice
Bob x<-\o   Alice
Bob <--\o   Alice
Bob o<--\o  Alice
Bob x<--\o  Alice
Bob <<-\o   Alice
Bob o<<-\o  Alice
Bob x<<-\o  Alice
Bob <<--\o  Alice
Bob o<<--\o Alice
Bob x<<--\o Alice
Bob \-\o    Alice
Bob o\-\o   Alice
Bob x\-\o   Alice
Bob \--\o   Alice
Bob o\--\o  Alice
Bob x\--\o  Alice
Bob \\-\o   Alice
Bob o\\-\o  Alice
Bob x\\-\o  Alice
Bob \\--\o  Alice
Bob o\\--\o Alice
Bob x\\--\o Alice
Bob /-\o    Alice
Bob o/-\o   Alice
Bob x/-\o   Alice
Bob /--\o   Alice
Bob o/--\o  Alice
Bob x/--\o  Alice
Bob //-\o   Alice
Bob o//-\o  Alice
Bob x//-\o  Alice
Bob //--\o  Alice
Bob o//--\o Alice
Bob x//--\o Alice

Bob <-\x    Alice
Bob o<-\x   Alice
Bob x<-\x   Alice
Bob <--\x   Alice
Bob o<--\x  Alice
Bob x<--\x  Alice
Bob <<-\x   Alice
Bob o<<-\x  Alice
Bob x<<-\x  Alice
Bob <<--\x  Alice
Bob o<<--\x Alice
Bob x<<--\x Alice
Bob \-\x    Alice
Bob o\-\x   Alice
Bob x\-\x   Alice
Bob \--\x   Alice
Bob o\--\x  Alice
Bob x\--\x  Alice
Bob \\-\x   Alice
Bob o\\-\x  Alice
Bob x\\-\x  Alice
Bob \\--\x  Alice
Bob o\\--\x Alice
Bob x\\--\x Alice
Bob /-\x    Alice
Bob o/-\x   Alice
Bob x/-\x   Alice
Bob /--\x   Alice
Bob o/--\x  Alice
Bob x/--\x  Alice
Bob //-\x   Alice
Bob o//-\x  Alice
Bob x//-\x  Alice
Bob //--\x  Alice
Bob o//--\x Alice
Bob x//--\x Alice

Bob <-\\    Alice
Bob o<-\\   Alice
Bob x<-\\   Alice
Bob <--\\   Alice
Bob o<--\\  Alice
Bob x<--\\  Alice
Bob <<-\\   Alice
Bob o<<-\\  Alice
Bob x<<-\\  Alice
Bob <<--\\  Alice
Bob o<<--\\ Alice
Bob x<<--\\ Alice
Bob \-\\    Alice
Bob o\-\\   Alice
Bob x\-\\   Alice
Bob \--\\   Alice
Bob o\--\\  Alice
Bob x\--\\  Alice
Bob \\-\\   Alice
Bob o\\-\\  Alice
Bob x\\-\\  Alice
Bob \\--\\  Alice
Bob o\\--\\ Alice
Bob x\\--\\ Alice
Bob /-\\    Alice
Bob o/-\\   Alice
Bob x/-\\   Alice
Bob /--\\   Alice
Bob o/--\\  Alice
Bob x/--\\  Alice
Bob //-\\   Alice
Bob o//-\\  Alice
Bob x//-\\  Alice
Bob //--\\  Alice
Bob o//--\\ Alice
Bob x//--\\ Alice

Bob <-\\o    Alice
Bob o<-\\o   Alice
Bob x<-\\o   Alice
Bob <--\\o   Alice
Bob o<--\\o  Alice
Bob x<--\\o  Alice
Bob <<-\\o   Alice
Bob o<<-\\o  Alice
Bob x<<-\\o  Alice
Bob <<--\\o  Alice
Bob o<<--\\o Alice
Bob x<<--\\o Alice
Bob \-\\o    Alice
Bob o\-\\o   Alice
Bob x\-\\o   Alice
Bob \--\\o   Alice
Bob o\--\\o  Alice
Bob x\--\\o  Alice
Bob \\-\\o   Alice
Bob o\\-\\o  Alice
Bob x\\-\\o  Alice
Bob \\--\\o  Alice
Bob o\\--\\o Alice
Bob x\\--\\o Alice
Bob /-\\o    Alice
Bob o/-\\o   Alice
Bob x/-\\o   Alice
Bob /--\\o   Alice
Bob o/--\\o  Alice
Bob x/--\\o  Alice
Bob //-\\o   Alice
Bob o//-\\o  Alice
Bob x//-\\o  Alice
Bob //--\\o  Alice
Bob o//--\\o Alice
Bob x//--\\o Alice

Bob <-\\x    Alice
Bob o<-\\x   Alice
Bob x<-\\x   Alice
Bob <--\\x   Alice
Bob o<--\\x  Alice
Bob x<--\\x  Alice
Bob <<-\\x   Alice
Bob o<<-\\x  Alice
Bob x<<-\\x  Alice
Bob <<--\\x  Alice
Bob o<<--\\x Alice
Bob x<<--\\x Alice
Bob \-\\x    Alice
Bob o\-\\x   Alice
Bob x\-\\x   Alice
Bob \--\\x   Alice
Bob o\--\\x  Alice
Bob x\--\\x  Alice
Bob \\-\\x   Alice
Bob o\\-\\x  Alice
Bob x\\-\\x  Alice
Bob \\--\\x  Alice
Bob o\\--\\x Alice
Bob x\\--\\x Alice
Bob /-\\x    Alice
Bob o/-\\x   Alice
Bob x/-\\x   Alice
Bob /--\\x   Alice
Bob o/--\\x  Alice
Bob x/--\\x  Alice
Bob //-\\x   Alice
Bob o//-\\x  Alice
Bob x//-\\x  Alice
Bob //--\\x  Alice
Bob o//--\\x Alice
Bob x//--\\x Alice

Bob <-/    Alice
Bob o<-/   Alice
Bob x<-/   Alice
Bob <--/   Alice
Bob o<--/  Alice
Bob x<--/  Alice
Bob <<-/   Alice
Bob o<<-/  Alice
Bob x<<-/  Alice
Bob <<--/  Alice
Bob o<<--/ Alice
Bob x<<--/ Alice
Bob \-/    Alice
Bob o\-/   Alice
Bob x\-/   Alice
Bob \--/   Alice
Bob o\--/  Alice
Bob x\--/  Alice
Bob \\-/   Alice
Bob o\\-/  Alice
Bob x\\-/  Alice
Bob \\--/  Alice
Bob o\\--/ Alice
Bob x\\--/ Alice
Bob /-/    Alice
Bob o/-/   Alice
Bob x/-/   Alice
Bob /--/   Alice
Bob o/--/  Alice
Bob x/--/  Alice
Bob //-/   Alice
Bob o//-/  Alice
Bob x//-/  Alice
Bob //--/  Alice
Bob o//--/ Alice
Bob x//--/ Alice

Bob <-/o    Alice
Bob o<-/o   Alice
Bob x<-/o   Alice
Bob <--/o   Alice
Bob o<--/o  Alice
Bob x<--/o  Alice
Bob <<-/o   Alice
Bob o<<-/o  Alice
Bob x<<-/o  Alice
Bob <<--/o  Alice
Bob o<<--/o Alice
Bob x<<--/o Alice
Bob \-/o    Alice
Bob o\-/o   Alice
Bob x\-/o   Alice
Bob \--/o   Alice
Bob o\--/o  Alice
Bob x\--/o  Alice
Bob \\-/o   Alice
Bob o\\-/o  Alice
Bob x\\-/o  Alice
Bob \\--/o  Alice
Bob o\\--/o Alice
Bob x\\--/o Alice
Bob /-/o    Alice
Bob o/-/o   Alice
Bob x/-/o   Alice
Bob /--/o   Alice
Bob o/--/o  Alice
Bob x/--/o  Alice
Bob //-/o   Alice
Bob o//-/o  Alice
Bob x//-/o  Alice
Bob //--/o  Alice
Bob o//--/o Alice
Bob x//--/o Alice

Bob <-/x    Alice
Bob o<-/x   Alice
Bob x<-/x   Alice
Bob <--/x   Alice
Bob o<--/x  Alice
Bob x<--/x  Alice
Bob <<-/x   Alice
Bob o<<-/x  Alice
Bob x<<-/x  Alice
Bob <<--/x  Alice
Bob o<<--/x Alice
Bob x<<--/x Alice
Bob \-/x    Alice
Bob o\-/x   Alice
Bob x\-/x   Alice
Bob \--/x   Alice
Bob o\--/x  Alice
Bob x\--/x  Alice
Bob \\-/x   Alice
Bob o\\-/x  Alice
Bob x\\-/x  Alice
Bob \\--/x  Alice
Bob o\\--/x Alice
Bob x\\--/x Alice
Bob /-/x    Alice
Bob o/-/x   Alice
Bob x/-/x   Alice
Bob /--/x   Alice
Bob o/--/x  Alice
Bob x/--/x  Alice
Bob //-/x   Alice
Bob o//-/x  Alice
Bob x//-/x  Alice
Bob //--/x  Alice
Bob o//--/x Alice
Bob x//--/x Alice

Bob <-//    Alice
Bob o<-//   Alice
Bob x<-//   Alice
Bob <--//   Alice
Bob o<--//  Alice
Bob x<--//  Alice
Bob <<-//   Alice
Bob o<<-//  Alice
Bob x<<-//  Alice
Bob <<--//  Alice
Bob o<<--// Alice
Bob x<<--// Alice
Bob \-//    Alice
Bob o\-//   Alice
Bob x\-//   Alice
Bob \--//   Alice
Bob o\--//  Alice
Bob x\--//  Alice
Bob \\-//   Alice
Bob o\\-//  Alice
Bob x\\-//  Alice
Bob \\--//  Alice
Bob o\\--// Alice
Bob x\\--// Alice
Bob /-//    Alice
Bob o/-//   Alice
Bob x/-//   Alice
Bob /--//   Alice
Bob o/--//  Alice
Bob x/--//  Alice
Bob //-//   Alice
Bob o//-//  Alice
Bob x//-//  Alice
Bob //--//  Alice
Bob o//--// Alice
Bob x//--// Alice

Bob <-//o    Alice
Bob o<-//o   Alice
Bob x<-//o   Alice
Bob <--//o   Alice
Bob o<--//o  Alice
Bob x<--//o  Alice
Bob <<-//o   Alice
Bob o<<-//o  Alice
Bob x<<-//o  Alice
Bob <<--//o  Alice
Bob o<<--//o Alice
Bob x<<--//o Alice
Bob \-//o    Alice
Bob o\-//o   Alice
Bob x\-//o   Alice
Bob \--//o   Alice
Bob o\--//o  Alice
Bob x\--//o  Alice
Bob \\-//o   Alice
Bob o\\-//o  Alice
Bob x\\-//o  Alice
Bob \\--//o  Alice
Bob o\\--//o Alice
Bob x\\--//o Alice
Bob /-//o    Alice
Bob o/-//o   Alice
Bob x/-//o   Alice
Bob /--//o   Alice
Bob o/--//o  Alice
Bob x/--//o  Alice
Bob //-//o   Alice
Bob o//-//o  Alice
Bob x//-//o  Alice
Bob //--//o  Alice
Bob o//--//o Alice
Bob x//--//o Alice

Bob <-//x    Alice
Bob o<-//x   Alice
Bob x<-//x   Alice
Bob <--//x   Alice
Bob o<--//x  Alice
Bob x<--//x  Alice
Bob <<-//x   Alice
Bob o<<-//x  Alice
Bob x<<-//x  Alice
Bob <<--//x  Alice
Bob o<<--//x Alice
Bob x<<--//x Alice
Bob \-//x    Alice
Bob o\-//x   Alice
Bob x\-//x   Alice
Bob \--//x   Alice
Bob o\--//x  Alice
Bob x\--//x  Alice
Bob \\-//x   Alice
Bob o\\-//x  Alice
Bob x\\-//x  Alice
Bob \\--//x  Alice
Bob o\\--//x Alice
Bob x\\--//x Alice
Bob /-//x    Alice
Bob o/-//x   Alice
Bob x/-//x   Alice
Bob /--//x   Alice
Bob o/--//x  Alice
Bob x/--//x  Alice
Bob //-//x   Alice
Bob o//-//x  Alice
Bob x//-//x  Alice
Bob //--//x  Alice
Bob o//--//x Alice
Bob x//--//x Alice

@enduml
BobBobAliceAlice

actor

@startuml

actor Alice #green

' a comment this is

participant Bob
box "Sweet deal"
  participant "Mr funky foo" as M #EAA
  participant "Mr. Sleepy" as S #AEA
end box

ref over Alice, Bob: init

== Auth Plot ==
Alice --> Bob: Authenticaion Request
Bob   --> Alice: Successful auth
Bob   --> M: Alice is on
M     --> Alice: Hello Alice, I am M
...time passes...
M --> S: Here is some dough!
Alice --> Alice: Say, is it breezy?
activate Alice
||22||
Alice --> M: Pleased to meet you,\nNow about Bob...
||22||
destroy Alice
Bob --> M: Woops, Alice was destroyed
deactivate Bob
== Revival ==
activate M
M ->]: << createSomeFoo >>
M <--]: DidMakeSomeFoo
M -->o Alice: Thou art revived! 
deactivate M

@enduml
Sweet dealAliceAliceBobBobMr funky fooMr funky fooMr. SleepyMr. SleepyrefinitAuth PlotAuthenticaion RequestSuccessful authAlice is onHello Alice, I am Mtime passesHere is some dough!Say, is it breezy?Pleased to meet you,Now about Bob...Woops, Alice was destroyedRevival«createSomeFoo»DidMakeSomeFooThou art revived!

class

@startuml

class Foo <<Bar>> {
  You can use
  several lines
  ..
  As you want
  and group
  ==
  things together.
  --
  You can have as many
  groups as you want.
  --
  +publicMethod()
  -privateMethod()
  #protectedMethod()
  End of class
}

class Bar { 
  note: This is a class
  .. Hello foo ..
  +public
  .. Private things prefixed with - ..
  -private
  #protected
  int foo
  String password
}

interface IBar {
  int a
  int b
  --
  +public()
  -private()
}

Foo --> Bar
IBar --> Foo
IBar --> Bar

@enduml
«Bar»FooYou can useseveral linesAs you wantand groupthings together.You can have as manygroups as you want.publicMethod()privateMethod()protectedMethod()End of classBarnote: This is a classpublicHello fooprivateprotectedint fooString passwordPrivate things prefixed with -IBarint aint bpublic()private()

mindmap-multilines

@startmindmap
* foo
**:multi
line;
**_:multiline
without box;
***[#red] inline color
***[#blue]_ inline color without box
@endmindmap

foomultilinemultilinewithout boxinline colorinline color without box

object

@startuml

title Objects and Interfaces

interface Zzapper <<FooFoo>>  {
  +publicAbc()
  #protectedAbc()
}

object Zzap {
  int a
  int b
  --
  +publicAbc()
  #protectedAbc()
  -privateAbc()
  note: This is an object
  ==
  note: here is a loop
}

object User {
  name = "dummy"
  id = 123
  --
  +userJump(int length)
  +userEat(Food food)
}

object Food {
  int calories
  string name
}

object Store {
  name = "superCat"
  id = 347
}

Zzapper --> Zzap

User --|> Store
User --|> Zzap

Food --* User
Food --o Store

@enduml
Objects and Interfaces«FooFoo»ZzapperpublicAbc()protectedAbc()Zzapint aint bpublicAbc()protectedAbc()privateAbc()note: This is an objectnote: here is a loopUsername = "dummy"id = 123userJump(int length)userEat(Food food)Foodint caloriesstring nameStorename = "superCat"id = 347

01-01-1 Basic-examples

@startuml
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
Alice -> Bob: Another authentication Request
Alice <-- Bob: another authentication Response
@enduml
AliceAliceBobBobAuthentication RequestAuthentication ResponseAnother authentication Requestanother authentication Response

01-02-1 Declaring-participant

@startuml
participant participant as Foo
actor actor as Foo1
boundary boundary as Foo2
control control as Foo3
entity entity as Foo4
database database as Foo5
collections collections as Foo6
queue queue as Foo7
Foo -> Foo1 : To actor
Foo -> Foo2 : To boundary
Foo -> Foo3 : To control
Foo -> Foo4 : To entity
Foo -> Foo5 : To database
Foo -> Foo6 : To collections
Foo -> Foo7: To queue
@enduml
participantparticipantactoractorboundaryboundarycontrolcontrolentityentitydatabasedatabasecollectionscollectionsqueuequeueTo actorTo boundaryTo controlTo entityTo databaseTo collectionsTo queue

01-02-2 Declaring-participant

@startuml
actor Bob #red
' The only difference between actor
'and participant is the drawing
participant Alice
participant "I have a really\nlong name" as L #99FF99
/' You can also declare:
participant L as "I have a really\nlong name" #99FF99
'/
Alice->Bob: Authentication Request
Bob->Alice: Authentication Response
Bob->L: Log transaction
@enduml
BobBobAliceAliceI have a reallylong nameI have a reallylong nameAuthentication RequestAuthentication ResponseLog transaction

01-02-3 Declaring-participant

@startuml
participant Last order 30
participant Middle order 20
participant First order 10
@enduml
FirstFirstMiddleMiddleLastLast

01-03-1 Use-non-letters-in-participants

@startuml
Alice -> "Bob()" : Hello
"Bob()" -> "This is very\nlong" as Long
' You can also declare:
' "Bob()" -> Long as "This is very\nlong"
Long --> "Bob()" : ok
@enduml
AliceAliceBob()Bob()This is verylongThis is verylongHellook

01-04-1 Message-to-Self

@startuml
Alice->Alice: This is a signal to self.\nIt also demonstrates\nmultiline \ntext
@enduml
AliceAliceThis is a signal to self.It also demonstratesmultilinetext

01-05-1 Text-alignment

@startuml
skinparam responseMessageBelowArrow true
Bob -> Alice : hello
Alice -> Bob : ok
@enduml
BobBobAliceAlicehellook

01-06-1 Change-arrow-style

@startuml
Bob ->x Alice
Bob -> Alice
Bob ->> Alice
Bob -\ Alice
Bob \\- Alice
Bob //-- Alice
Bob ->o Alice
Bob o\\-- Alice
Bob <-> Alice
Bob <->o Alice
@enduml
BobBobAliceAlice

01-07-1 Change-arror-color

@startuml
Bob -[#red]> Alice : hello
Alice -[#0000FF]->Bob : ok
@enduml
BobBobAliceAlicehellook

01-08-1 Message-sequence-numbering

@startuml
autonumber
Bob -> Alice : Authentication Request
Bob <- Alice : Authentication Response
@enduml
BobBobAliceAlice1Authentication Request2Authentication Response

01-08-2 Message-sequence-numbering

@startuml
autonumber
Bob -> Alice : Authentication Request
Bob <- Alice : Authentication Response
autonumber 15
Bob -> Alice : Another authentication Request
Bob <- Alice : Another authentication Response
autonumber 40 10
Bob -> Alice : Yet another authentication Request
Bob <- Alice : Yet another authentication Response
@enduml
BobBobAliceAlice1Authentication Request2Authentication Response15Another authentication Request16Another authentication Response40Yet another authentication Request50Yet another authentication Response

01-08-3 Message-sequence-numbering

@startuml
autonumber "<b>[000]"
Bob -> Alice : Authentication Request
Bob <- Alice : Authentication Response
autonumber 15 "<b>(<u>##</u>)"
Bob -> Alice : Another authentication Request
Bob <- Alice : Another authentication Response
autonumber 40 10 "<font color=red><b>Message 0 "
Bob -> Alice : Yet another authentication Request
Bob <- Alice : Yet another authentication Response
@enduml
BobBobAliceAlice[001]Authentication Request[002]Authentication Response(15)Another authentication Request(16)Another authentication ResponseMessage 40Yet another authentication RequestMessage 50Yet another authentication Response

01-08-4 Message-sequence-numbering

@startuml
autonumber 10 10 "<b>[000]"
Bob -> Alice : Authentication Request
Bob <- Alice : Authentication Response
autonumber stop
Bob -> Alice : dummy
autonumber resume "<font color=red><b>Message 0 "
Bob -> Alice : Yet another authentication Request
Bob <- Alice : Yet another authentication Response
autonumber stop
Bob -> Alice : dummy
autonumber resume 1 "<font color=blue><b>Message 0 "
Bob -> Alice : Yet another authentication Request
Bob <- Alice : Yet another authentication Response
@enduml
BobBobAliceAlice[010]Authentication Request[020]Authentication ResponsedummyMessage 30Yet another authentication RequestMessage 40Yet another authentication ResponsedummyMessage 50Yet another authentication RequestMessage 51Yet another authentication Response

01-09-1 Page-Title-Header-and-Footer

@startuml
header Page Header
footer Page %page% of %lastpage%
title Example Title
Alice -> Bob : message 1
Alice -> Bob : message 2
@enduml
Example TitleAliceAliceBobBobmessage 1message 2Page HeaderPage 1 of 1

01-10-1 Split-diagrams

@startuml
Alice -> Bob : message 1
Alice -> Bob : message 2
newpage
Alice -> Bob : message 3
Alice -> Bob : message 4
newpage A title for the\nlast page
Alice -> Bob : message 5
Alice -> Bob : message 6
@enduml
AliceAliceBobBobmessage 1message 2

01-11-1 Grouping-message

@startuml
Alice -> Bob: Authentication Request
alt successful case
  Bob -> Alice: Authentication Accepted
else some kind of failure
  Bob -> Alice: Authentication Failure
  group My own label
    Alice -> Log : Log attack start
    loop 1000 times
      Alice -> Bob: DNS Attack
    end
    Alice -> Log : Log attack end
  end
else Another type of failure
  Bob -> Alice: Please repeat
end
@enduml
AliceAliceBobBobLogLogAuthentication Requestalt[successful case]Authentication Accepted[some kind of failure]Authentication FailureMy own labelLog attack startloop[1000 times]DNS AttackLog attack end[Another type of failure]Please repeat

01-12-1 Secondary-group-label

@startuml
Alice -> Bob: Authentication Request
alt successful case
  Bob -> Alice: Authentication Accepted
else some kind of failure
  Bob -> Alice: Authentication Failure
  group My own label
    Alice -> Log : Log attack start
    loop 1000 times
      Alice -> Bob: DNS Attack
    end
    Alice -> Log : Log attack end
  end
else Another type of failure
  Bob -> Alice: Please repeat
end
@enduml
AliceAliceBobBobLogLogAuthentication Requestalt[successful case]Authentication Accepted[some kind of failure]Authentication FailureMy own labelLog attack startloop[1000 times]DNS AttackLog attack end[Another type of failure]Please repeat

01-13-1 Notes-on-messages

@startuml
Alice->Bob : hello
note left: this is a first note
Bob->Alice : ok
note right: this is another note
Bob->Bob : I am thinking
note left
  a note
  can also be defined
  on several lines
end note
@enduml
AliceAliceBobBobhellothis is a first noteokthis is another noteI am thinkinga notecan also be definedon several lines

01-14-1 Some-other-notes

@startuml
participant Alice
participant Bob
note left of Alice #aqua
  This is displayed
  left of Alice.
end note
note right of Alice: This is displayed right of Alice.
note over Alice: This is displayed over Alice.
note over Alice, Bob #FFAAAA: This is displayed\n over Bob and Alice.
note over Bob, Alice
  This is yet another
  example of
  a long note.
end note
@enduml
AliceAliceBobBobThis is displayedleft of Alice.This is displayed right of Alice.This is displayed over Alice.This is displayedover Bob and Alice.This is yet anotherexample ofa long note.

01-15-1 Changing-notes-shape

@startuml
caller -> server : conReq
hnote over caller : idle
caller <- server : conConf
rnote over server
  "r" as rectangle
  "h" as hexagon
endrnote
rnote over server
  this is
  on several
  lines
endrnote
hnote over caller
  this is
  on several
  lines
endhnote
@enduml
callercallerserverserverconReqidleconConf"r" as rectangle"h" as hexagonthis ison severallinesthis ison severallines

01-16-1 Note-over-all-participants

@startuml
Alice->Bob:m1
Bob->Charlie:m2
note over Alice, Charlie: Old method for note over all part. with:\n ""note over //FirstPart, LastPart//"".
note across: New method with:\n""note across""
Bob->Alice
hnote across:Note across all part.
@enduml
AliceAliceBobBobCharlieCharliem1m2Old method for note over all part. with: note overFirstPart, LastPart.New method with:note acrossNote across all part.

01-17-1 Several-notes-aligned-at-the-same-level

@startuml
note over Alice : initial state of Alice
note over Bob : initial state of Bob
Bob -> Alice : hello
@enduml
AliceAliceBobBobinitial state of Aliceinitial state of Bobhello

01-17-2 Several-notes-aligned-at-the-same-level

@startuml
note over Alice : initial state of Alice
/ note over Bob : initial state of Bob
Bob -> Alice : hello
@enduml
AliceAliceBobBobinitial state of Aliceinitial state of Bobhello

01-18-1 Creole-and-HTML

@startuml
participant Alice
participant "The **Famous** Bob" as Bob
Alice -> Bob : hello --there--
... Some ~~long delay~~ ...
Bob -> Alice : ok
note left
  This is **bold**
  This is //italics//
  This is ""monospaced""
  This is --stroked--
  This is __underlined__
  This is ~~waved~~
end note
Alice -> Bob : A //well formatted// message
note right of Alice
  This is <back:cadetblue><size:18>displayed</size></back>
  __left of__ Alice.
end note
note left of Bob
  <u:red>This</u> is <color #118888>displayed</color>
  **<color purple>left of</color> <s:red>Alice</strike> Bob**.
end note
note over Alice, Bob
  <w:#FF33FF>This is hosted</w> by <img sourceforge.jpg>
end note
@enduml
AliceAliceTheFamousBobTheFamousBobhellothereSomelong delay okThis isboldThis isitalicsThis ismonospacedThis isstrokedThis isunderlinedThis iswavedAwell formattedmessageThis isdisplayedleft ofAlice.Thisisdisplayedleft of AliceBob.This is hostedby(Cannot decode)

01-19-1 Divider-or-separator

@startuml
== Initialization ==
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
== Repetition ==
Alice -> Bob: Another authentication Request
Alice <-- Bob: another authentication Response
@enduml
AliceAliceBobBobInitializationAuthentication RequestAuthentication ResponseRepetitionAnother authentication Requestanother authentication Response

01-20-1 Reference

@startuml
participant Alice
actor Bob
ref over Alice, Bob : init
Alice -> Bob : hello
ref over Bob
  This can be on
  several lines
end ref
@enduml
AliceAliceBobBobrefinithellorefThis can be onseveral lines

01-21-1 Delay

@startuml
Alice -> Bob: Authentication Request
...
Bob --> Alice: Authentication Response
...5 minutes latter...
Bob --> Alice: Bye !
@enduml
AliceAliceBobBobAuthentication RequestAuthentication Response5 minutes latterBye !

01-22-1 Text-wrapping

@startuml
skinparam maxMessageSize 50
participant a
participant b
a -> b : this\nis\nmanually\ndone
a -> b : this is a very long message on several words
@enduml
aabbthisismanuallydonethis is averylongmessageonseveralwords

01-23-1 Space

@startuml
Alice -> Bob: message 1
Bob --> Alice: ok
|||
Alice -> Bob: message 2
Bob --> Alice: ok
||45||
Alice -> Bob: message 3
Bob --> Alice: ok
@enduml

AliceAliceBobBobmessage 1okmessage 2okmessage 3ok

01-24-1 lifeline

@startuml
participant User
User -> A: DoWork
activate A
A -> B: << createRequest >>
activate B
B -> C: DoWork
activate C
C --> B: WorkDone
destroy C
B --> A: RequestCreated
deactivate B
A -> User: Done
deactivate A
@enduml
UserUserAABBCCDoWork«createRequest»DoWorkWorkDoneRequestCreatedDone

01-24-2 lifeline

@startuml
participant User
User -> A: DoWork
activate A #FFBBBB
A -> A: Internal call
activate A #DarkSalmon
A -> B: << createRequest >>
activate B
B --> A: RequestCreated
deactivate B
deactivate A
A -> User: Done
deactivate A
@endum
UserUserAABBDoWorkInternal call«createRequest»RequestCreatedDone

01-24-3 lifeline

@startuml
autoactivate on
alice -> bob : hello
bob -> bob : self call
bill -> bob #005500 : hello from thread 2
bob -> george ** : create
return done in thread 2
return rc
bob -> george !! : delete
return success
@enduml
alicealicebobbobbillbillgeorgehelloself callhello from thread 2creategeorgedone in thread 2rcdeletesuccess

01-25-1 Return

@startuml
Bob -> Alice : hello
activate Alice
Alice -> Alice : some action
return bye
@enduml
BobBobAliceAlicehellosome actionbye

01-26-1 Participant-creation

@startuml
Bob -> Alice : hello
create Other
Alice -> Other : new
create control String
Alice -> String
note right : You can also put notes!
Alice --> Bob : ok
@enduml
BobBobAliceAliceOtherStringhellonewOtherStringYou can also put notes!ok

01-27-1 Shortcut-syntax-for-activation-deactivation-creation

@startuml
alice -> bob ++ : hello
bob -> bob ++ : self call
bob -> bib ++ #005500 : hello
bob -> george ** : create
return done
return rc
bob -> george !! : delete
return success
@enduml
alicealicebobbobbibbibgeorgehelloself callhellocreategeorgedonercdeletesuccess

01-28-1 Incoming-and-outgoing-messages

@startuml
[-> A: DoWork
activate A
A -> A: Internal call
activate A
A ->] : << createRequest >>
A<--] : RequestCreated
deactivate A
[<- A: Done
deactivate A
@enduml
AADoWorkInternal call«createRequest»RequestCreatedDone

01-28-2 Incoming-and-outgoing-messages

@startuml
participant Alice
participant Bob #lightblue
Alice -> Bob
Bob -> Carol
...
[-> Bob
[o-> Bob
[o->o Bob
[x-> Bob
...
[<- Bob
[x<- Bob
...
Bob ->]
Bob ->o]
Bob o->o]
Bob ->x]
...
Bob <-]
Bob x<-]
@enduml
AliceAliceBobBobCarolCarol

01-29-1 Short-arrows-for-incoming-and-outgoing-messages

@startuml
?-> Alice : ""?->""\n**short** to actor1
[-> Alice : ""[->""\n**from start** to actor1
[-> Bob : ""[->""\n**from start** to actor2
?-> Bob : ""?->""\n**short** to actor2
Alice ->] : ""->]""\nfrom actor1 **to end**
Alice ->?  : ""->?""\n**short** from actor1
Alice -> Bob : ""->"" \nfrom actor1 to actor2
@enduml
AliceAliceBobBob?->shortto actor1[->from startto actor1[->from startto actor2?->shortto actor2->]from actor1to end->?shortfrom actor1-> from actor1 to actor2

01-30-1 Anchors-and-Durations

@startuml
!pragma teoz true
{start} Alice -> Bob : start doing things during duration
Bob -> Max : something
Max -> Bob : something else
{end} Bob -> Alice : finish
{start} <-> {end} : some time
@enduml
some timeAliceBobMaxAliceBobMaxstart doing things during durationsomethingsomething elsefinishsome time

01-31-1 Stereotypes-and-Spots

@startuml
participant "Famous Bob" as Bob << Generated >>
participant Alice << (C,#ADD1B2) Testable >>
Bob->Alice: First message
@enduml
«Generated»Famous Bob«Generated»Famous Bob«Testable»Alice«Testable»AliceFirst message

01-31-2 Stereotypes-and-Spots

@startuml
skinparam guillemet false
participant "Famous Bob" as Bob << Generated >>
participant Alice << (C,#ADD1B2) Testable >>
Bob->Alice: First message
@enduml
<< Generated >>Famous Bob<< Generated >>Famous Bob<< Testable >>Alice<< Testable >>AliceFirst message

01-31-3 Stereotypes-and-Spots

@startuml
participant Bob << (C,#ADD1B2) >>
participant Alice << (C,#ADD1B2) >>
Bob->Alice: First message
@enduml
BobBobAliceAliceFirst message

01-32-1 More-information-on-titles

@startuml
title __Simple__ **communication** example
Alice -> Bob: Authentication Request
Bob -> Alice: Authentication Response
@enduml
Simple communicationexampleAliceAliceBobBobAuthentication RequestAuthentication Response

01-32-2 More-information-on-titles

@startuml
title __Simple__ communication example\non several lines
Alice -> Bob: Authentication Request
Bob -> Alice: Authentication Response
@enduml
Simplecommunication exampleon several linesAliceAliceBobBobAuthentication RequestAuthentication Response

01-32-3 More-information-on-titles

@startuml
title
  <u>Simple</u> communication example
  on <i>several</i> lines and using <font color=red>html</font>
  This is hosted by <img:sourceforge.jpg>
end title
Alice -> Bob: Authentication Request
Bob -> Alice: Authentication Response
@enduml
Simplecommunication exampleonseverallines and usinghtmlThis is hosted by(Cannot decode)AliceAliceBobBobAuthentication RequestAuthentication Response

01-33-1 Participants-encompass

@startuml
box "Internal Service" #LightBlue
  participant Bob
  participant Alice
end box
participant Other
Bob -> Alice : hello
Alice -> Other : hello
@enduml
Internal ServiceBobBobAliceAliceOtherOtherhellohello

01-34-1 Removing-Foot-Boxes

@startuml
hide footbox
title Footer removed
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
@enduml
Footer removedAliceBobAuthentication RequestAuthentication Response

01-35-1 Skinparam

@startuml
skinparam sequenceArrowThickness 2
skinparam roundcorner 20
skinparam maxmessagesize 60
skinparam sequenceParticipant underline
actor User
participant "First Class" as A
participant "Second Class" as B
participant "Last Class" as C
User -> A: DoWork
activate A
A -> B: Create Request
activate B
B -> C: DoWork
activate C
C --> B: WorkDone
destroy C
B --> A: Request Created
deactivate B
A --> User: Done
deactivate A
@enduml
UserUserFirst ClassFirst ClassSecond ClassSecond ClassLast ClassLast ClassDoWorkCreateRequestDoWorkWorkDoneRequestCreatedDone

01-35-2 Skinparam

@startuml
skinparam backgroundColor #EEEBDC
skinparam handwritten true
skinparam sequence {
  ArrowColor DeepSkyBlue
  ActorBorderColor DeepSkyBlue
  LifeLineBorderColor blue
  LifeLineBackgroundColor #A9DCDF
  ParticipantBorderColor DeepSkyBlue
  ParticipantBackgroundColor DodgerBlue
  ParticipantFontName Impact
  ParticipantFontSize 17
  ParticipantFontColor #A9DCDF
  ActorBackgroundColor aqua
  ActorFontColor DeepSkyBlue
  ActorFontSize 17
  ActorFontName Aapex
}
actor User
participant "First Class" as A
participant "Second Class" as B
participant "Last Class" as C
User -> A: DoWork
activate A
A -> B: Create Request
activate B
B -> C: DoWork
activate C
C --> B: WorkDone
destroy C
B --> A: Request Created
deactivate B
A --> User: Done
deactivate A
@enduml
UserUserFirst ClassFirst ClassSecond ClassSecond ClassLast ClassLast ClassDoWorkCreate RequestDoWorkWorkDoneRequest CreatedDone

01-36-1 Changing padding

@startuml
skinparam ParticipantPadding 20
skinparam BoxPadding 10
box "Foo1"
  participant Alice1
  participant Alice2
end box
box "Foo2"
  participant Bob1
  participant Bob2
end box
Alice1 -> Bob1 : hello
Alice1 -> Out : out
@enduml
Foo1Foo2Alice1Alice1Alice2Alice2Bob1Bob1Bob2Bob2OutOuthelloout

02-01-1 Usecase

@startuml
(First usecase)
(Another usecase) as (UC2)
usecase UC3
usecase (Last\nusecase) as UC4
@enduml
First usecaseAnother usecaseUC3Lastusecase

02-02-1 Actors

@startuml
:First Actor:
:Another\nactor: as Men2
actor Men3
actor :Last actor: as Men4
@enduml
First ActorAnotheractorMen3Last actor

02-03-1 Stick-man

@startuml
:User: --> (Use)
"Main Admin" as Admin
"Use the application" as (Use)
Admin --> (Admin the application)
@enduml
UserUse the applicationMain AdminAdmin the application

02-03-2 Awesome-man

@startuml
skinparam actorStyle awesome
:User: --> (Use)
"Main Admin" as Admin
"Use the application" as (Use)
Admin --> (Admin the application)
@enduml
UserUse the applicationMain AdminAdmin the application

02-03-3 Hollow-man

@startuml
skinparam actorStyle Hollow
:User: --> (Use)
"Main Admin" as Admin
"Use the application" as (Use)
Admin --> (Admin the application)
@enduml
UserUse the applicationMain AdminAdmin the application

02-04-1 Usecases-description

@startuml
usecase UC1 as "You can use
several lines to define your usecase.
You can also use separators.
--
Several separators are possible.
==
And you can add titles:
..Conclusion..
This allows large description."
@enduml
You can useseveral lines to define your usecase.You can also use separators.Several separators are possible.And you can add titles:This allows large description.Conclusion

02-05-1 Use-package

@startuml
left to right direction
actor Guest as g
package Professional {
  actor Chef as c
  actor "Food Critic" as fc
}
package Restaurant {
  usecase "Eat Food" as UC1
  usecase "Pay for Food" as UC2
  usecase "Drink" as UC3
  usecase "Review" as UC4
}
fc --> UC4
g --> UC1
g --> UC2
g --> UC3
@enduml
ProfessionalRestaurantChefFood CriticEat FoodPay for FoodDrinkReviewGuest

02-05-2 Use-package

@startuml
left to right direction
actor "Food Critic" as fc
rectangle Restaurant {
  usecase "Eat Food" as UC1
  usecase "Pay for Food" as UC2
  usecase "Drink" as UC3
}
fc --> UC1
fc --> UC2
fc --> UC3
@enduml
RestaurantEat FoodPay for FoodDrinkFood Critic

02-06-1 Basic-example

@startuml
User -> (Start)
User --> (Use the application) : A small label
:Main Admin: ---> (Use the application) : This is\nyet another\nlabel
@enduml

UserStartUse the applicationMain AdminA small labelThis isyet anotherlabel

02-07-1 Extension

@startuml
:Main Admin: as Admin
(Use the application) as (Use)
User <|-- Admin
(Start) <|-- (Use)
@enduml

Main AdminUse the applicationUserStart

02-08-1 Using-notes

@startuml
:Main Admin: as Admin
(Use the application) as (Use)
User -> (Start)
User --> (Use)
Admin ---> (Use)
note right of Admin : This is an example.
note right of (Use)
  A note can also
  be on several lines
end note
note "This note is connected\nto several objects." as N2
(Start) .. N2
N2 .. (Use)
@enduml
Main AdminUse the applicationUserStartThis is an example.A note can alsobe on several linesThis note is connectedto several objects.

02-09-1 Stereotypes

@startuml
User << Human >>
:Main Database: as MySql << Application >>
(Start) << One Shot >>
(Use the application) as (Use) << Main >>
User -> (Start)
User --> (Use)
MySql --> (Use)
@enduml
User«Human»Main Database«Application»«One Shot»Start«Main»Use the application

02-10-1 Changing-arrows-direction

@startuml
:user: --> (Use case 1)
:user: -> (Use case 2)
@enduml
userUse case 1Use case 2

02-10-2 Changing-arrows-direction

@startuml
(Use case 1) <.. :user:
(Use case 2) <- :user:
@enduml
Use case 1userUse case 2

02-10-3 Changing-arrows-direction

@startuml
:user: -left-> (dummyLeft)
:user: -right-> (dummyRight)
:user: -up-> (dummyUp)
:user: -down-> (dummyDown)
@enduml
userdummyLeftdummyRightdummyUpdummyDown

02-10-4 Changing-arrows-direction

@startuml
left to right direction
:user: -left-> (dummyLeft)
:user: -right-> (dummyRight)
:user: -up-> (dummyUp)
:user: -down-> (dummyDown)
@enduml
userdummyLeftdummyRightdummyUpdummyDown

02-11-1 Splitting-diagrams

@startuml
:actor1: --> (Usecase1)
newpage
:actor2: --> (Usecase2)
@enduml
actor1Usecase1

02-12-1 Left-to-right-direction

@startuml
'default
top to bottom direction
user1 --> (Usecase 1)
user2 --> (Usecase 2)
@enduml
user1Usecase 1user2Usecase 2

02-12-2 Left-to-right-direction

@startuml
left to right direction
user1 --> (Usecase 1)
user2 --> (Usecase 2)
@enduml
user1Usecase 1user2Usecase 2

02-13-1 Skinparam

@startuml
skinparam handwritten true
skinparam usecase {
  BackgroundColor DarkSeaGreen
  BorderColor DarkSlateGray
  BackgroundColor<< Main >> YellowGreen
  BorderColor<< Main >> YellowGreen
  ArrowColor Olive
  ActorBorderColor black
  ActorFontName Courier
  ActorBackgroundColor<< Human >> Gold
}
User << Human >>
:Main Database: as MySql << Application >>
(Start) << One Shot >>
(Use the application) as (Use) << Main >>
User -> (Start)
User --> (Use)
MySql --> (Use)
@enduml
User«Human»Main Database«Application»«One Shot»Start«Main»Use the application

02-14-1 Complete-example

@startuml
left to right direction
skinparam packageStyle rectangle
actor customer
actor clerk
rectangle checkout {
  customer -- (checkout)
  (checkout) .> (payment) : include
  (help) .> (checkout) : extends
  (checkout) -- clerk
}
@enduml

checkoutpaymenthelpcustomerclerkincludeextends

02-15-1 Business-Use-Case

@startuml
(First usecase)/
(Another usecase)/ as (UC2)
usecase/ UC3
usecase/ (Last\nusecase) as UC4
@enduml
First usecaseAnother usecaseUC3Lastusecase

02-15-2 Business-Actor

@startuml
:First Actor:/
:Another\nactor:/ as Man2
actor/ Woman3
actor/ :Last actor: as Person1
@enduml
First ActorAnotheractorWoman3Last actor

02-16-1 Change-arrow-color-and-style

@startuml
actor foo
foo --> (bar) : normal
foo --> (bar1) #line:red;line.bold;text:red : red bold
foo --> (bar2) #green;line.dashed;text:green : green dashed
foo --> (bar3) #blue;line.dotted;text:blue : blue dotted
@enduml
foobarbar1bar2bar3normalred boldgreen dashedblue dotted

02-17-1 Change-element-color-and-style

@startuml
actor a
actor b #pink;line:red;line.bold;text:red
usecase c #palegreen;line:green;line.dashed;text:green
usecase d #aliceblue;line:blue;line.dotted;text:blue
@enduml
abcd

03-01-1 Declaring-element

@startuml
abstract abstract
abstract class "abstract class"
annotation annotation
circle circle
() circle_short_form
class class
diamond diamond
<> diamond_short_form
entity entity
enum enum
interface interface
@enduml
abstractabstract classannotationcirclecircle_short_formclassentityenuminterface

03-02-1 Relations-between-classes

@startuml
Class01 <|-- Class02
Class03 *-- Class04
Class05 o-- Class06
Class07 .. Class08
Class09 -- Class10
@enduml
Class01Class02Class03Class04Class05Class06Class07Class08Class09Class10

03-02-2 Relations-between-classes

@startuml
Class11 <|.. Class12
Class13 --> Class14
Class15 ..> Class16
Class17 ..|> Class18
Class19 <--* Class20
@enduml
Class11Class12Class13Class14Class15Class16Class17Class18Class19Class20

03-02-3 Relations-between-classes

@startuml
Class21 #-- Class22
Class23 x-- Class24
Class25 }-- Class26
Class27 +-- Class28
Class29 ^-- Class30
@enduml
Class21Class22Class23Class24Class25Class26Class27Class28Class29Class30

03-03-1 Label-on-relations

@startuml
Class01 "1" *-- "many" Class02 : contains
Class03 o-- Class04 : aggregation
Class05 --> "1" Class06
@enduml
Class01Class02Class03Class04Class05Class06contains1manyaggregation1

03-03-2 Label-on-relations

@startuml
class Car
Driver - Car : drives >
Car *- Wheel : have 4 >
Car -- Person : < owns
@enduml
CarDriverWheelPersondriveshave 4owns

03-04-1 Adding-methods

@startuml
Object <|-- ArrayList
Object : equals()
ArrayList : Object[] elementData
ArrayList : size()
@enduml
Objectequals()ArrayListObject[] elementDatasize()

03-04-2 Adding-methods

@startuml
class Dummy {
  String data
  void methods()
}
class Flight {
  flightNumber : Integer
  departureTime : Date
}
@enduml
DummyString datavoid methods()FlightflightNumber : IntegerdepartureTime : Date

03-04-3 Adding-methods

@startuml
class Dummy {
  {field} A field (despite parentheses)
  {method} Some method
}
@enduml
DummyA field (despite parentheses)Some method

03-05-1 Defining-visibility

@startuml
class Dummy {
  -field1
  #field2
  ~method1()
  +method2()
}
@enduml
Dummyfield1field2method1()method2()

03-05-2 Defining-visibility

@startuml
skinparam classAttributeIconSize 0
class Dummy {
  -field1
  #field2
  ~method1()
  +method2()
}
@enduml
Dummy-field1#field2~method1()+method2()

03-06-1 Abstract-and-Static

@startuml
class Dummy {
  {static} String id
  {abstract} void methods()
}
@enduml

DummyString idvoid methods()

03-07-1 Advanced-class-body

@startuml
class Foo1 {
  You can use
  several lines
  ..
  as you want
  and group
  ==
  things together.
  __
  You can have as many groups
  as you want
  --
  End of class
}
class User {
  .. Simple Getter ..
  + getName()
  + getAddress()
  .. Some setter ..
  + setName()
  __ private data __
  int age
  -- encrypted --
  String password
}
@enduml

Foo1You can useseveral linesas you wantand groupthings together.You can have as many groupsas you wantEnd of classUsergetName()getAddress()Simple GettersetName()Some setterint ageprivate dataString passwordencrypted

03-08-1 Notes-and-stereotypes

@startuml
class Object << general >>
Object <|--- ArrayList
note top of Object : In java, every class\nextends this one.
note "This is a floating note" as N1
note "This note is connected\nto several objects." as N2
Object .. N2
N2 .. ArrayList
class Foo
note left: On last defined class
@enduml

«general»ObjectArrayListIn java, every classextends this one.This is a floating noteThis note is connectedto several objects.FooOn last defined class

03-09-1 More-on-notes

@startuml
class Foo
note left: On last defined class
class Object
note top of Object
  In java, <size:18>every</size> <u>class</u>
  <b>extends</b>
  <i>this</i> one.
end note
note as N1
  This note is <u>also</u>
  <b><color:royalBlue>on several</color>
  <s>words</s> lines
  And this is hosted by <img:sourceforge.jpg>
end note
@enduml

FooOn last defined classObjectIn java,every classextendsthisone.This note isalsoon severalwordslinesAnd this is hosted by(Cannot decode)

03-10-1 Note-on-field-or-method

@startuml
class A {
  {static} int counter
  +void {abstract} start(int timeout)
}
note right of A::counter
This member is annotated
end note
note right of A::start
This method is now explained in a UML note
end note
@enduml
Aint countervoid start(int timeout)This member is annotatedThis method is now explained in a UML note

03-10-2 Note-on-method-with-the-same-name

@startuml
class A {
  {static} int counter
  +void {abstract} start(int timeoutms)
  +void {abstract} start(Duration timeout)
}
note left of A::counter
This member is annotated
end note
note right of A::"start(int timeoutms)"
This method with int
end note
note right of A::"start(Duration timeout)"
This method with Duration
end note
@enduml
Aint countervoid start(int timeoutms)void start(Duration timeout)This member is annotatedThis method with intThis method with Duration

03-11-1 Note-on-links

@startuml
class Dummy
Dummy --> Foo : A link
note on link #red: note that is red
Dummy --> Foo2 : Another link
note right on link #blue
  this is my note on right link
  and in blue
end note
@enduml
DummyFooFoo2A linknote that is redAnother linkthis is my note on right linkand in blue

03-12-1 Abstract-class-and-interface

@startuml
abstract class AbstractList
abstract AbstractCollection
interface List
interface Collection
List <|-- AbstractList
Collection <|-- AbstractCollection
Collection <|- List
AbstractCollection <|- AbstractList
AbstractList <|-- ArrayList
class ArrayList {
  Object[] elementData
  size()
}
enum TimeUnit {
  DAYS
  HOURS
  MINUTES
}
annotation SuppressWarnings
@enduml
AbstractListAbstractCollectionListCollectionArrayListObject[] elementDatasize()TimeUnitDAYSHOURSMINUTESSuppressWarnings

03-13-1 Using-non-letters

@startuml
class "This is my class" as class1
class class2 as "It works this way too"
class2 *-- "foo/dummy" : use
@enduml
This is my classIt works this way toofoo/dummyuse

03-14-1 Hide-attributes-methods

@startuml
class Dummy1 {
  +myMethods()
}
class Dummy2 {
  +hiddenMethod()
}
class Dummy3 <<Serializable>> {
  String name
}
hide members
hide <<Serializable>> circle
show Dummy1 methods
show <<Serializable>> fields
@enduml
Dummy1myMethods()Dummy2«Serializable»Dummy3String name

03-15-1 Hide-classes

@startuml
class Foo1
class Foo2
Foo2 *-- Foo1
hide Foo2
@enduml
Foo1

03-16-1 Remove-classes

@startuml
class Foo1
class Foo2
Foo2 *-- Foo1
remove Foo2
@enduml
Foo1

03-17-1 Hide-or-Remove-unlinked-class

@startuml
class C1
class C2
class C3
C1 -- C2
@enduml
C1C2C3

03-17-2 Hide-or-Remove-unlinked-class

@startuml
class C1
class C2
class C3
C1 -- C2
hide @unlinked
@enduml
C1C2

03-17-3 Hide-or-Remove-unlinked-class

@startuml
class C1
class C2
class C3
C1 -- C2
remove @unlinked
@enduml
C1C2

03-18-1 Use-generics

@startuml
class Foo<? extends Element> {
  int size()
}
Foo *- Element
@enduml
Foo? extends Elementint size()Element

03-19-1 Specific-Spot

@startuml
class System << (S,#FF7700) Singleton >>
class Date << (D,orchid) >>
@enduml
«Singleton»SystemDate

03-20-1 Packages

@startuml
package "Classic Collections" #DDDDDD {
  Object <|-- ArrayList
}
package net.sourceforge.plantuml {
  Object <|-- Demo1
  Demo1 *- Demo2
}
@enduml
Classic CollectionsnetsourceforgeplantumlObjectArrayListDemo1Demo2

03-21-1 Packages-style

@startuml
scale 750 width
package foo1 <<Node>> {
  class Class1
}
package foo2 <<Rectangle>> {
  class Class2
}
package foo3 <<Folder>> {
  class Class3
}
package foo4 <<Frame>> {
  class Class4
}
package foo5 <<Cloud>> {
  class Class5
}
package foo6 <<Database>> {
  class Class6
}
@enduml
foo1foo2foo3foo4foo5foo6Class1Class2Class3Class4Class5Class6

03-21-2 Packages-style

@startuml
skinparam packageStyle rectangle

package foo1.foo2 {
}

package foo1.foo2.foo3 {
  class Object
}

foo1.foo2 +-- foo1.foo2.foo3
@enduml
foo1foo2foo3Object

03-22-1 Namespaces

@startuml
class BaseClass
namespace net.dummy #DDDDDD {
  .BaseClass <|-- Person
  Meeting o-- Person
  .BaseClass <|- Meeting
}
namespace net.foo {
  net.dummy.Person <|- Person
  .BaseClass <|-- Person
  net.dummy.Meeting o-- Person
}
BaseClass <|-- net.unused.Person
@enduml
netdummyunusedPersonMeetingfooPersonBaseClass

03-23-1 Automatic-namespace-creation

@startuml
set namespaceSeparator ::
class X1::X2::foo {
  some info
}
@enduml
X1X2foosome info

03-23-2 Automatic-namespace-creation

@startuml
set namespaceSeparator none
class X1.X2.foo {
  some info
}
@enduml
X1.X2.foosome info

03-24-1 Lollipop-interface

@startuml
class foo
bar ()- foo
@enduml
foobar

03-25-1 Changing-arrows-direction

@startuml
Room o- Student
Room *-- Chair
@enduml
RoomStudentChair

03-25-2 Changing-arrows-direction

@startuml
Student -o Room
Chair --* Room
@enduml
StudentRoomChair

03-25-3 Changing-arrows-direction

@startuml
foo -left-> dummyLeft
foo -right-> dummyRight
foo -up-> dummyUp
foo -down-> dummyDown
@enduml
foodummyLeftdummyRightdummyUpdummyDown

03-25-4 Changing-arrows-direction

@startuml
left to right direction
foo -left-> dummyLeft
foo -right-> dummyRight
foo -up-> dummyUp
foo -down-> dummyDown
@enduml
foodummyLeftdummyRightdummyUpdummyDown

03-26-1 Association-classes

@startuml
class Student {
  Name
}
Student "0..*" - "1..*" Course
(Student, Course) .. Enrollment
class Enrollment {
  drop()
  cancel()
}
@enduml
StudentNameCourseEnrollmentdrop()cancel()0..*1..*

03-26-2 Association-classes

@startuml
class Student {
  Name
}
Student "0..*" -- "1..*" Course
(Student, Course) . Enrollment
class Enrollment {
  drop()
  cancel()
}
@enduml
StudentNameCourseEnrollmentdrop()cancel()0..*1..*

03-27-1 Association-on-same-classe

@startuml
class Station {
  +name: string
}

class StationCrossing {
  +cost: TimeInterval
}

<> diamond

StationCrossing . diamond
diamond - "from 0..*" Station
diamond - "to 0..* " Station
@enduml
Stationname: stringStationCrossingcost: TimeIntervalfrom 0..*to 0..*

03-28-1 Skinparam

@startuml
skinparam class {
  BackgroundColor PaleGreen
  ArrowColor SeaGreen
  BorderColor SpringGreen
}
skinparam stereotypeCBackgroundColor YellowGreen
Class01 "1" *-- "many" Class02 : contains
Class03 o-- Class04 : aggregation
@enduml
Class01Class02Class03Class04contains1manyaggregation

03-29-1 Skinned-Stereotypes

@startuml
skinparam class {
  BackgroundColor PaleGreen
  ArrowColor SeaGreen
  BorderColor SpringGreen
  BackgroundColor<<Foo>> Wheat
  BorderColor<<Foo>> Tomato
}
skinparam stereotypeCBackgroundColor YellowGreen
skinparam stereotypeCBackgroundColor<< Foo >> DimGray
Class01 <<Foo>>
Class03 <<Foo>>
Class01 "1" *-- "many" Class02 : contains
Class03 o-- Class04 : aggregation
@enduml
Class01«Foo»Class03«Foo»Class02Class04contains1manyaggregation

03-30-1 Color-gradient

@startuml
skinparam backgroundcolor AntiqueWhite/Gold
skinparam classBackgroundColor Wheat|CornflowerBlue
class Foo #red-green
note left of Foo #blue\9932CC
  this is my
  note on this class
  end note
  package example #GreenYellow/LightGoldenRodYellow {
    class Dummy
  }
@enduml

exampleDummyFoothis is mynote on this class

03-31-1 Help-on-layout

@startuml
class Bar1
class Bar2
together {
  class Together1
  class Together2
  class Together3
}
Together1 - Together2
Together2 - Together3
Together2 -[hidden]--> Bar1
Bar1 -[hidden]> Bar2
@enduml
Bar1Bar2Together1Together2Together3

03-32-1 Splitting-large-files

@startuml
' Split into 4 pages
page 2x2
skinparam pageMargin 10
skinparam pageExternalColor gray
skinparam pageBorderColor black
class BaseClass
namespace net.dummy #DDDDDD {
  .BaseClass <|-- Person
  Meeting o-- Person
  .BaseClass <|- Meeting
}
namespace net.foo {
  net.dummy.Person <|- Person
  .BaseClass <|-- Person
  net.dummy.Meeting o-- Person
}
BaseClass <|-- net.unused.Person
@enduml
netdummyunusedPersonMeetingfooPersonBaseClass

03-33-1 Extends-and-implements

@startuml
class ArrayList implements List
class ArrayList extends AbstractList
@enduml
ArrayListListAbstractList

03-34-01-1 Bracketed-relations-style-Line-style

@startuml
title Bracketed line style without label
class foo
class bar
bar1 : [bold]
bar2 : [dashed]
bar3 : [dotted]
bar4 : [hidden]
bar5 : [plain]
foo --> bar
foo -[bold]-> bar1
foo -[dashed]-> bar2
foo -[dotted]-> bar3
foo -[hidden]-> bar4
foo -[plain]-> bar5
@enduml
Bracketed line style without labelfoobarbar1[bold]bar2[dashed]bar3[dotted]bar4[hidden]bar5[plain]

03-34-01-2 Bracketed-relations-style-Line-style

@startuml
title Bracketed line style with label
class foo
class bar
bar1 : [bold]
bar2 : [dashed]
bar3 : [dotted]
bar4 : [hidden]
bar5 : [plain]
foo --> bar          : ?
foo -[bold]-> bar1   : [bold]
foo -[dashed]-> bar2 : [dashed]
foo -[dotted]-> bar3 : [dotted]
foo -[hidden]-> bar4 : [hidden]
foo -[plain]-> bar5  : [plain]
@enduml
Bracketed line style with labelfoobarbar1[bold]bar2[dashed]bar3[dotted]bar4[hidden]bar5[plain]?[bold][dashed][dotted][plain]

03-34-02-1 Bracketed-relations-style-Line-color

@startuml
title Bracketed line color
class foo
class bar
bar1 : [#red]
bar2 : [#green]
bar3 : [#blue]

foo --> bar
foo -[#red]-> bar1   : [#red]
foo -[#green]-> bar2 : [#green]
foo -[#blue]-> bar3  : [#blue]
'foo -[#blue;#yellow;#green]-> bar4
@enduml
Bracketed line colorfoobarbar1[#red]bar2[#green]bar3[#blue][#red][#green][#blue]

03-34-03-1 Bracketed-relations-style-Line-thickness

@startuml
title Bracketed line thickness
class foo
class bar
bar1 : [thickness=1]
bar2 : [thickness=2]
bar3 : [thickness=4]
bar4 : [thickness=8]
bar5 : [thickness=16]

foo --> bar                : 
foo -[thickness=1]-> bar1  : [1]
foo -[thickness=2]-> bar2  : [2]
foo -[thickness=4]-> bar3  : [4]
foo -[thickness=8]-> bar4  : [8]
foo -[thickness=16]-> bar5 : [16]
@enduml
Bracketed line thicknessfoobarbar1[thickness=1]bar2[thickness=2]bar3[thickness=4]bar4[thickness=8]bar5[thickness=16][1][2][4][8][16]

03-34-04-1 Bracketed-relations-style-Mix

@startuml
title Bracketed line style mix
class foo
class bar
bar1 : [#red,thickness=1]
bar2 : [#red,dashed,thickness=2]
bar3 : [#green,dashed,thickness=4]
bar4 : [#blue,dotted,thickness=8]
bar5 : [#blue,plain,thickness=16]

foo --> bar                             : 
foo -[#red,thickness=1]-> bar1          : [#red,1]
foo -[#red,dashed,thickness=2]-> bar2   : [#red,dashed,2]
foo -[#green,dashed,thickness=4]-> bar3 : [#green,dashed,4]
foo -[#blue,dotted,thickness=8]-> bar4  : [blue,dotted,8]
foo -[#blue,plain,thickness=16]-> bar5  : [blue,plain,16]
@enduml
Bracketed line style mixfoobarbar1[#red,thickness=1]bar2[#red,dashed,thickness=2]bar3[#green,dashed,thickness=4]bar4[#blue,dotted,thickness=8]bar5[#blue,plain,thickness=16][#red,1][#red,dashed,2][#green,dashed,4][blue,dotted,8][blue,plain,16]

03-35-1 Change-relation-color-and-style

@startuml
class foo
foo --> bar : normal
foo --> bar1 #line:red;line.bold;text:red  : red bold
foo --> bar2 #green;line.dashed;text:green : green dashed
foo --> bar3 #blue;line.dotted;text:blue   : blue dotted
@enduml
foobarbar1bar2bar3normalred boldgreen dashedblue dotted

03-36-1 Change-class-color-and-style

@startuml
abstract   abstract
annotation annotation #pink;line:red;line.bold;text:red
class      class      #palegreen;line:green;line.dashed;text:green
interface  interface  #aliceblue;line:blue;line.dotted;text:blue
@enduml
abstractannotationclassinterface

03-36-2 Change-class-color-and-style

@startuml
class bar #line:green;back:lightblue
class bar2 #lightblue;line:green
class Foo1 #back:red;line:00FFFF
class FooDashed #line.dashed:blue
class FooDotted #line.dotted:blue
class FooBold #line.bold
class Demo1 #back:lightgreen|yellow;header:blue/red
@enduml
barbar2Foo1FooDashedFooDottedFooBoldDemo1

03-37-1 Arrows-fromto-class-members

@startuml
class Foo {
  + field1
  + field2
}
class Bar {
  + field3
  + field4
}
Foo::field1 --> Bar::field3 : foo
Foo::field2 --> Bar::field4 : bar
@enduml
Foofield1field2Barfield3field4foobar

03-37-2 Arrows-fromto-class-members

@startuml
left to right direction
class User {
  id : INTEGER
  ..
  other_id : INTEGER
}
class Email {
  id : INTEGER
  ..
  user_id : INTEGER
  address : INTEGER
}
User::id *-- Email::user_id
@enduml
Userid : INTEGERother_id : INTEGEREmailid : INTEGERuser_id : INTEGERaddress : INTEGER

04-01-1 Definition-of-objects

@startuml
object firstObject
object "My Second Object" as o2
@enduml
firstObjectMy Second Object

04-02-1 Relations-between-objects

@startuml
object Object01
object Object02
object Object03
object Object04
object Object05
object Object06
object Object07
object Object08
Object01 <|-- Object02
Object03 *-- Object04
Object05 o-- "4" Object06
Object07 .. Object08 : some labels
@enduml
Object01Object02Object03Object04Object05Object06Object07Object084some labels

04-03-1 Associations-objects

@startuml
object o1
object o2
diamond dia
object o3

o1 --> dia
o2 --> dia
dia --> o3
@enduml
o1o2o3

04-04-1 Adding-fields

@startuml
object user
user : name = "Dummy"
user : id = 123
@enduml
username = "Dummy"id = 123

04-04-2 Adding-fields

@startuml
object user {
  name = "Dummy"
  id = 123
}
@enduml
username = "Dummy"id = 123

04-06-1 Map-table-or-associative-array

@startuml
map CapitalCity {
UK => London
USA => Washington
Germany => Berlin
}
@enduml
CapitalCityUKLondonUSAWashingtonGermanyBerlin

04-06-2 Map-table-or-associative-array

@startuml
map "Map **Contry => CapitalCity**" as CC {
UK => London
USA => Washington
Germany => Berlin
}
@enduml
MapContry => CapitalCityUKLondonUSAWashingtonGermanyBerlin

04-06-3 Map-table-or-associative-array

@startuml
map "map: Map<Integer, String>" as users {
1 => Alice
2 => Bob
3 => Charlie
}
@enduml
map: Map<Integer, String>1Alice2Bob3Charlie

04-06-4 Map-table-or-associative-array

@startuml
object London
map CapitalCity {
UK *-> London
USA => Washington
Germany => Berlin
}
@enduml
LondonCapitalCityUKUSAWashingtonGermanyBerlin

04-06-5 Map-table-or-associative-array

@startuml
object London
object Washington
object Berlin
object NewYork

map CapitalCity {
UK *-> London
USA *--> Washington
Germany *---> Berlin
}

NewYork --> CapitalCity::USA
@enduml
LondonWashingtonBerlinNewYorkCapitalCityUKUSAGermany

05-01-1 Simple-Action

@startuml
(*) --> "First Action"
"First Action" --> (*)
@enduml
First Action

05-02-1 Label-on-arrows

@startuml
(*) --> "First Action"
-->[You can put also labels] "Second Action"
--> (*)
@enduml
First ActionSecond ActionYou can put also labels

05-03-1 Changing-arrow-direction

@startuml
(*) -up-> "First Action"
-right-> "Second Action"
--> "Third Action"
-left-> (*)
@enduml
First ActionSecond ActionThird Action

05-04-1 Branches

@startuml
(*) --> "Initialization"
if "Some Test" then
  -->[true] "Some Action"
  --> "Another Action"
  -right-> (*)
else
  ->[false] "Something else"
  -->[Ending process] (*)
endif
@enduml
InitializationSome ActionAnother ActionSomething elseSome TesttruefalseEnding process

05-04-2 Branches

@startuml
(*) --> "check input"
If "input is verbose" then
--> [Yes] "turn on verbosity"
--> "run command"
else
  --> "run command"
  Endif
  -->(*)
@enduml
check inputturn on verbosityrun commandinput is verboseYes

05-05-1 More-on-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
action 1action 3action 5action 6action 2action 7action 8Some Testtrue Other testfalselast test

05-06-1 Synchronization

@startuml
(*) --> ===B1===
--> "Parallel Action 1"
--> ===B2===
===B1=== --> "Parallel Action 2"
--> ===B2===
--> (*)
@enduml
Parallel Action 1Parallel Action 2

05-07-1 Long-action-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
thisactionisvery long2and defined on several linesthat contains manytextAnother actionon several linesShort action(Cannot decode)

05-08-1 Notes

@startuml
(*) --> "Some action"
note right: This action has to be defined
"Some action" --> (*)
note left
  This note is on
  several lines
end note
@enduml
Some actionThis action has to be definedThis note is onseveral lines

05-09-1 Partition

@startuml
partition Conductor {
  (*) --> "Climbs on Platform"
  --> === S1 ===
  --> Bows
}
partition Audience #LightSkyBlue {
  === S1 === --> Applauds
}
partition Conductor {
  Bows --> === S2 ===
  --> WavesArmes
  Applauds --> === S2 ===
}
partition Orchestra #CCCCEE {
  WavesArmes --> Introduction
  --> "Play music"
}
@enduml
ConductorAudienceOrchestraClimbs on PlatformBowsWavesArmesApplaudsIntroductionPlay music

05-10-1 Skinparam

@startuml
skinparam backgroundColor #AAFFFF
skinparam activity {
  StartColor red
  BarColor SaddleBrown
  EndColor Silver
  BackgroundColor Peru
  BackgroundColor<< Begin >> Olive
  BorderColor Peru
  FontName Impact
}
(*) --> "Climbs on Platform" << Begin >>
--> === S1 ===
--> Bows
--> === S2 ===
--> WavesArmes
--> (*)
@enduml
Climbs on PlatformBowsWavesArmes

05-11-1 Octagon

@startuml
'Default is skinparam activityShape roundBox
skinparam activityShape octagon
(*) --> "First Action"
"First Action" --> (*)
@enduml
First Action

05-12-1 Complete-example

@startuml
title Servlet Container
(*) --> "ClickServlet.handleRequest()"
--> "new Page"
if "Page.onSecurityCheck" then
  ->[true] "Page.onInit()"
  if "isForward?" then
    ->[no] "Process controls"
    if "continue processing?" then
      -->[yes] ===RENDERING===
    else
      -->[no] ===REDIRECT_CHECK===
    endif
  else
    -->[yes] ===RENDERING===
  endif
  if "is Post?" then
    -->[yes] "Page.onPost()"
    --> "Page.onRender()" as render
    --> ===REDIRECT_CHECK===
  else
    -->[no] "Page.onGet()"
    --> render
  endif
else
  -->[false] ===REDIRECT_CHECK===
endif
if "Do redirect?" then
  ->[yes] "redirect request"
  --> ==BEFORE_DESTROY===
else
  if "Do Forward?" then
    -left->[yes] "Forward request"
    --> ==BEFORE_DESTROY===
  else
    -right->[no] "Render page template"
    --> ==BEFORE_DESTROY===
  endif
endif
--> "Page.onDestroy()"
-->(*)
@enduml
Servlet ContainerClickServlet.handleRequest()new PagePage.onInit()Process controlsPage.onPost()Page.onRender()Page.onGet()redirect requestForward requestRender page templatePage.onDestroy()Page.onSecurityChecktrueisForward?nocontinue processing?yesnoyesis Post?yesnofalseDo redirect?yesDo Forward?yesno

06-01-1 Simple-action

@startuml
:Hello world;
:This is on defined on
several **lines**;
@enduml
Hello worldThis is on defined onseverallines

06-02-1 Start-Stop-End

@startuml
start
:Hello world;
:This is on defined on
several **lines**;
stop
@enduml
Hello worldThis is on defined onseverallines

06-02-2 Start-Stop-End

@startuml
start
:Hello world;
:This is on defined on
several **lines**;
end
@enduml
Hello worldThis is on defined onseverallines

06-03-01-1 Conditional-Several-tests-horizontal-mode

@startuml
start
if (condition A) then (yes)
  :Text 1;
elseif (condition B) then (yes)
:Text 2;
stop
elseif (condition C) then (yes)
:Text 3;
elseif (condition D) then (yes)
:Text 4;
else (nothing)
  :Text else;
endif
stop
@enduml
yescondition AText 1yescondition BText 2yescondition CText 3yescondition DnothingText 4Text else

06-03-01-2 Conditional-Several-tests-vertical-mode

@startuml
!pragma useVerticalIf on
start
if (condition A) then (yes)
  :Text 1;
elseif (condition B) then (yes)
:Text 2;
stop
elseif (condition C) then (yes)
:Text 3;
elseif (condition D) then (yes)
:Text 4;
else (nothing)
  :Text else;
endif
stop
@enduml
Text 1Text 2Text 3Text 4condition Ayescondition Byescondition Cyescondition DyesText elsenothing

06-03-1 Conditional

@startuml
start
if (Graphviz installed?) then (yes)
  :process all\ndiagrams;
else (no)
  :process only
  __sequence__ and __activity__ diagrams;
endif
stop
@enduml
Graphviz installed?yesnoprocess alldiagramsprocess onlysequenceandactivitydiagrams

06-03-2 Conditional

@startuml
if (color?) is (<color:red>red) then
  :print red;
else
  :print not red;
@enduml
color?redprint redprint not red

06-03-3 Conditional

@startuml
if (counter?) equals (5) then
  :print 5;
else
  :print not 5;
@enduml
counter?5print 5print not 5

06-04-1 Conditional-with-stop-on-an-action

@startuml
if (condition?) then
  :error;
  stop
endif
#palegreen:action;
@enduml
errorcondition?action

06-04-2 Conditional-with-stop-on-an-action

@startuml
if (condition?) then
  #pink:error;
  kill
endif
#palegreen:action;
@enduml
errorcondition?action

06-04-3 Conditional-with-stop-on-an-action

@startuml
if (condition?) then
  #pink:error;
  detach
endif
#palegreen:action;
@enduml
errorcondition?action

06-05-1 Repeat-loop

@startuml
start
repeat
:read data;
:generate diagrams;
repeat while (more data?) is (yes)
->no;
stop
@enduml
read datagenerate diagramsmore data?yesno

06-05-2 Repeat-loop

@startuml
start
repeat
:read data;
:generate diagrams;
repeat while (more data?)
stop
@enduml
read datagenerate diagramsmore data?

06-06-1 Break-on-a-repeat-loop

@startuml
start
repeat
  :Test something;
    if (Something went wrong?) then (no)
      #palegreen:OK;
      break
    endif
    ->NOK;
    :Alert "Error with long text";
repeat while (Something went wrong with long text?) is (yes) not (no)
->//merged step//;
:Alert "Sucess";
stop
@endum
Test somethingOKnoSomething went wrong?Alert "Error with long text"noSomething went wrong with long text?yesAlert "Sucess"NOKmerged step

06-07-1 While-loop

@startuml
start
while (data available?)
  :read data;
  :generate diagrams;
endwhile
stop
@enduml
read datagenerate diagramsdata available?

06-07-2 While-loop

@startuml
while (check filesize ?) is (not empty)
  :read file;
endwhile (empty)
:close file;
@enduml
read filenot emptycheck filesize ?emptyclose file

06-08-1 Parallel-processing

@startuml
start
if (multiprocessor?) then (yes)
  fork
    :Treatment 1;
  fork again
    :Treatment 2;
  end fork
else (monoproc)
  :Treatment 1;
  :Treatment 2;
endif
@enduml
multiprocessor?yesmonoprocTreatment 1Treatment 2Treatment 1Treatment 2

06-09-01-1 Split-processing

@startuml
start
split
  :A;
  split again
    :B;
    split again
      :C;
      split again
        :a;
        :b;
      end split
      :D;
    end
@enduml
ABCabD

06-09-02-1 Split-processing

@startuml
split
  -[hidden]->
  :A;
  split again
    -[hidden]->
    :B;
    split again
      -[hidden]->
      :C;
    end split
    :D;
@enduml
ABCD

06-09-02-2 Split-processing

@startuml
split
  -[hidden]->
  :A;
  split again
    -[hidden]->
    :a;
    :b;
    split again
      -[hidden]->
      (Z)
    end split
    :D;
@enduml
AabD

06-09-03-1 Split-processing

@startuml
start
split
  :A;
  kill
  split again
    :B;
    detach
    split again
      :C;
      kill
    end split
@enduml
ABC

06-09-03-2 Split-processing

@startuml
start
split
  :A;
  kill
  split again
    :b;
    :c;
    detach
    split again
      (Z)
      detach
      split again
      end
      split again
        stop
      end split
@enduml
Abc

06-10-1 Notes

@startuml
start
:foo1;
floating note left: This is a note
:foo2;
note right
  This note is on several
  //lines// and can
  contain <b>HTML</b>
  ====
  * Calling the method ""foo()"" is prohibited
end note
stop
@enduml
This is a notefoo1This note is on severallinesand cancontainHTMLCalling the methodfoo()is prohibitedfoo2

06-10-2 Notes

@startuml
start
repeat :Enter data;
:Submit;
backward :Warning;
note right: Note
repeat while (Valid?) is (No) not (Yes)
stop
@enduml
SubmitEnter dataYesValid?NoNoteWarning

06-11-1 Colors

@startuml
start
:starting progress;
#HotPink:reading configuration files
These files should edited at this point!;
#AAAAAA:ending of the process;
@enduml
starting progressreading configuration filesThese files should edited at this point!ending of the process

06-12-1 Lines-without-arrows

@startuml
skinparam ArrowHeadColor none
start
:Hello world;
:This is on defined on
several **lines**;
stop
@enduml
Hello worldThis is on defined onseverallines

06-12-2 Lines-without-arrows

@startuml
skinparam ArrowHeadColor none
start
repeat :Enter data;
:Submit;
backward :Warning;
repeat while (Valid?) is (No) not (Yes)
stop
@enduml
SubmitEnter dataYesValid?NoWarning

06-13-1 Arrows

@startuml
:foo1;
-> You can put text on arrows;
if (test) then
  -[#blue]->
  :foo2;
  -[#green,dashed]-> The text can
  also be on several lines
  and **very** long...;
  :foo3;
else
  -[#black,dotted]->
  :foo4;
endif
-[#gray,bold]->
:foo5;
@enduml
foo1testfoo2foo3foo4foo5The text canalso be on several linesandverylong...You can put text on arrows

06-14-1 Connector

@startuml
start
:Some activity;
(A)
detach
(A)
:Other activity;
@enduml
Some activityOther activity

06-15-1 Color-on-connector

@startuml
start
:The connector below
wishes he was blue;
#blue:(B)
:This next connector
feels that she would
be better off green;
#green:(G)
stop
@enduml
The connector belowwishes he was blueThis next connectorfeels that she wouldbe better off green

06-16-1 Grouping-or-partition

@startuml
start
partition Initialization {
  :read config file;
  :init internal variable;
}
partition Running {
  :wait for user interaction;
  :print information;
}
stop
@enduml
Initializationread config fileinit internal variableRunningwait for user interactionprint information

06-17-1 Swimlanes

@startuml
|Swimlane1|
start
:foo1;
|#AntiqueWhite|Swimlane2|
:foo2;
:foo3;
|Swimlane1|
:foo4;
|Swimlane2|
:foo5;
stop
@enduml
foo1foo4foo2foo3foo5Swimlane1Swimlane2

06-17-2 Swimlanes

@startuml
|#pink|Actor_For_red|
start
if (color?) is (red) then
  #pink:**action red**;
  :foo1;
else (not red)
  |#lightgray|Actor_For_no_red|
  #lightgray:**action not red**;
  :foo2;
endif
|Next_Actor|
#lightblue:foo3;
:foo4;
|Final_Actor|
#palegreen:foo5;
stop
@enduml
color?rednot redaction redfoo1action not redfoo2foo3foo4foo5Actor_For_redActor_For_no_redNext_ActorFinal_Actor

06-18-1 Detach-or-kill

@startuml
:start;
fork
  :foo1;
  :foo2;
fork again
  :foo3;
  detach
endfork
if (foo4) then
  :foo5;
  detach
endif
:foo6;
detach
:foo7;
stop
@enduml
startfoo1foo2foo3foo5foo4foo6foo7

06-18-2 Detach-or-kill

@startuml
:start;
fork
  :foo1;
  :foo2;
fork again
  :foo3;
  kill
endfork
if (foo4) then
  :foo5;
  kill
endif
:foo6;
kill
:foo7;
stop
@enduml
startfoo1foo2foo3foo5foo4foo6foo7

06-19-1 SDL

@startuml
:Ready;
:next(o)|
:Receiving;
split
  :nak(i)<
  :ack(o)>
  split again
    :ack(i)<
    :next(o)
    on several line|
    :i := i + 1]
    :ack(o)>
    split again
      :err(i)<
      :nak(o)>
      split again
        :foo/
        split again
          :i > 5}
          stop
        end split
        :finish;
@enduml

Readynext(o)Receivingnak(i)ack(o)ack(i)next(o)on several linei := i + 1ack(o)err(i)nak(o)fooi > 5finish

06-20-1 Complete-example

@startuml
start
:ClickServlet.handleRequest();
:new page;
if (Page.onSecurityCheck) then (true)
  :Page.onInit();
  if (isForward?) then (no)
    :Process controls;
    if (continue processing?) then (no)
      stop
    endif

    if (isPost?) then (yes)
      :Page.onPost();
    else (no)
      :Page.onGet();
    endif
    :Page.onRender();
  endif
else (false)
endif

if (do redirect?) then (yes)
  :redirect process;
else
  if (do forward?) then (yes)
    :Forward request;
  else (no)
    :Render page template;
  endif
endif

stop
@enduml
ClickServlet.handleRequest()new pagePage.onInit()Process controlscontinue processing?noisPost?yesnoPage.onPost()Page.onGet()Page.onRender()noisForward?truePage.onSecurityCheckfalsedo redirect?yesredirect processdo forward?yesnoForward requestRender page template

06-21-01-1 Condition-Style

@startuml
skinparam conditionStyle inside
start
repeat
:act1;
:act2;
repeatwhile (<b>end)
:act3;
@enduml
act1act2endact3

06-21-01-2 Condition-Style

@startuml
start
repeat
:act1;
:act2;
repeatwhile (<b>end)
:act3;
@enduml
act1act2endact3

06-21-02-1 Condition-Style

@startuml
skinparam conditionStyle diamond
start
repeat
:act1;
:act2;
repeatwhile (<b>end)
:act3;
@enduml
act1act2endact3

06-21-03-1 Condition-Style

@startuml
skinparam conditionStyle InsideDiamond
start
repeat
:act1;
:act2;
repeatwhile (<b>end)
:act3;
@enduml
act1act2endact3

06-21-03-2 Condition-Style

@startuml
skinparam conditionStyle foo1
start
repeat
:act1;
:act2;
repeatwhile (<b>end)
:act3;
@enduml
act1act2endact3

06-22-01-1 Condition-End-Style

@startuml
skinparam ConditionEndStyle diamond
:A;
if (decision) then (yes)
  :B1;
else (no)
endif
:C;
@enduml
AB1yesdecisionnoC

06-22-01-2 Condition-End-Style

@startuml
skinparam ConditionEndStyle diamond
:A;
if (decision) then (yes)
  :B1;
else (no)
  :B2;
endif
:C;
@enduml
AdecisionyesnoB1B2C

06-22-02-1 Condition-End-Style

@startuml
skinparam ConditionEndStyle hline
:A;
if (decision) then (yes)
  :B1;
else (no)
endif
:C;
@enduml
AB1yesdecisionnoC

06-22-02-2 Condition-End-Style

@startuml
skinparam ConditionEndStyle hline
:A;
if (decision) then (yes)
  :B1;
else (no)
  :B2;
endif
:C;
@enduml
AdecisionyesnoB1B2C

07-01-1 Components

@startuml
[First component]
[Another component] as Comp2
component Comp3
component [Last\ncomponent] as Comp4
@enduml
First componentAnother componentComp3Lastcomponent

07-02-1 Interfaces

@startuml
() "First Interface"
() "Another interface" as Interf2
interface Interf3
interface "Last\ninterface" as Interf4
@enduml
First InterfaceAnother interfaceInterf3Lastinterface

07-03-1 Basic-example

@startuml
DataAccess - [First Component]
[First Component] ..> HTTP : use
@enduml
DataAccessFirst ComponentHTTPuse

07-04-1 Using-notes

@startuml
interface "Data Access" as DA
DA - [First Component]
[First Component] ..> HTTP : use
note left of HTTP : Web Service only
note right of [First Component]
  A note can also
  be on several lines
end note
@enduml
Data AccessFirst ComponentHTTPWeb Service onlyA note can alsobe on several linesuse

07-05-1 Grouping-Components

@startuml
package "Some Group" {
  HTTP - [First Component]
  [Another Component]
}
node "Other Groups" {
  FTP - [Second Component]
  [First Component] --> FTP
}
cloud {
  [Example 1]
}
database "MySql" {
  folder "This is my folder" {
    [Folder 3]
  }
  frame "Foo" {
    [Frame 4]
  }
}
[Another Component] --> [Example 1]
[Example 1] --> [Folder 3]
[Folder 3] --> [Frame 4]
@enduml
Some GroupOther GroupsMySqlThis is my folderFooHTTPFirst ComponentAnother ComponentFTPSecond ComponentExample 1Folder 3Frame 4

07-06-1 Changing-arrows-direction

@startuml
[Component] --> Interface1
[Component] -> Interface2
@enduml
ComponentInterface1Interface2

07-06-2 Changing-arrows-direction

@startuml
Interface1 <-- [Component]
Interface2 <- [Component]
@enduml
Interface1ComponentInterface2

07-06-3 Changing-arrows-direction

@startuml
[Component] -left-> left
[Component] -right-> right
[Component] -up-> up
[Component] -down-> down
@enduml
Componentleftrightupdown

07-06-4 Changing-arrows-direction

@startuml
left to right direction
[Component] -left-> left
[Component] -right-> right
[Component] -up-> up
[Component] -down-> down
@enduml
Componentleftrightupdown

07-07-1 Use-UML2-notation

@startuml
interface "Data Access" as DA
DA - [First Component]
[First Component] ..> HTTP : use
@enduml
Data AccessFirst ComponentHTTPuse

07-08-1 Use-UML1-notation

@startuml
skinparam componentStyle uml1
interface "Data Access" as DA
DA - [First Component]
[First Component] ..> HTTP : use
@enduml
Data AccessFirst ComponentHTTPuse

07-09-1 Use-rectangle-notation

@startuml
skinparam componentStyle rectangle
interface "Data Access" as DA
DA - [First Component]
[First Component] ..> HTTP : use
@enduml
Data AccessFirst ComponentHTTPuse

07-10-1 Long description

@startuml
component comp1 [
This component
has a long comment
on several lines
]
@enduml
This componenthas a long commenton several lines

07-11-1 Individual-colors

@startuml
component [Web Server] #Yellow
@enduml
Web Server

07-12-1 Using-Sprite-in-Stereotype

@startuml
sprite $businessProcess [16x16/16] {
FFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFF
FFFFFFFFFF0FFFFF
FFFFFFFFFF00FFFF
FF00000000000FFF
FF000000000000FF
FF00000000000FFF
FFFFFFFFFF00FFFF
FFFFFFFFFF0FFFFF
FFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFF
}
rectangle " End to End\nbusiness process" <<$businessProcess>> {
  rectangle "inner process 1" <<$businessProcess>> as src
  rectangle "inner process 2" <<$businessProcess>> as tgt
  src -> tgt
}
@enduml
End to Endbusiness processinner process 1inner process 2

07-13-1 Skinparam

@startuml
skinparam interface {
  backgroundColor RosyBrown
  borderColor orange
}
skinparam component {
  FontSize 13
  BackgroundColor<<Apache>> Red
  BorderColor<<Apache>> #FF6655
  FontName Courier
  BorderColor black
  BackgroundColor gold
  ArrowFontName Impact
  ArrowColor #FF6655
  ArrowFontColor #777777
}
() "Data Access" as DA
DA - [First Component]
[First Component] ..> () HTTP : use
HTTP - [Web Server] << Apache >>
@enduml
Data AccessFirst ComponentHTTPWeb Serveruse

07-13-2 Skinparam

@startuml
[AA] <<static lib>>
[BB] <<shared lib>>
[CC] <<static lib>>
node node1
node node2 <<shared node>>
database Production
skinparam component {
  backgroundColor<<static lib>> DarkKhaki
  backgroundColor<<shared lib>> Green
}
skinparam node {
  borderColor Green
  backgroundColor Yellow
  backgroundColor<<shared node>> Magenta
}
skinparam databaseBackgroundColor Aqua
@enduml
«static lib»AA«shared lib»BB«static lib»CCnode1«shared node»node2Production

07-14-01-1 componentStyle

@startuml
skinparam BackgroundColor transparent
skinparam componentStyle uml2
component A {
component "A.1" {
}
component A.44 {
[A4.1]
  }
  component "A.2"
  [A.3]
  component A.5 [
  A.5]
  component A.6 [
  ]
}
[a]->[b]
@enduml
AA.44A.2A.3A.5A.1A4.1ab

07-14-01-2 componentStyle

@startuml
skinparam BackgroundColor transparent
skinparam componentStyle rectangle
component A {
component "A.1" {
  }
  component A.44 {
  [A4.1]
}
component "A.2"
[A.3]
component A.5 [
A.5]
component A.6 [
]
}
[a]->[b]
@enduml
AA.44A.2A.3A.5A.1A4.1ab

07-15-1 Hide-or-Remove-unlinked-component

@startuml
component C1
component C2
component C3
C1 -- C2
@enduml
C1C2C3

07-15-2 Hide-or-Remove-unlinked-component

@startuml
component C1
component C2
component C3
C1 -- C2
hide @unlinked
@enduml
C1C2

07-15-3 Hide-or-Remove-unlinked-component

@startuml
component C1
component C2
component C3
C1 -- C2
remove @unlinked
@enduml
C1C2

08-01-1 Declaring-element

@startuml
actor actor
actor/ "actor/"
agent agent
artifact artifact
boundary boundary
card card
circle circle
cloud cloud
collections collections
component component
control control
database database
entity entity
file file
folder folder
frame frame
hexagon hexagon
interface interface
label label
node node
package package
queue queue
rectangle rectangle
stack stack
storage storage
usecase usecase
usecase/ "usecase/"
@enduml
actoractor/agentartifactboundarycardcirclecloudcollectionscomponentcontroldatabaseentityfilefolderframehexagoninterfacelabelnodepackagequeuerectanglestackstorageusecaseusecase/

08-01-2 Declaring-element

@startuml
folder folder [
This is a <b>folder
----
You can use separator
====
of different kind
....
and style
]
node node [
This is a <b>node
----
You can use separator
====
of different kind
....
and style
]
database database [
This is a <b>database
----
You can use separator
====
of different kind
....
and style
]
usecase usecase [
This is a <b>usecase
----
You can use separator
====
of different kind
....
and style
]
card card [
This is a <b>card
----
You can use separator
====
of different kind
....
and style
<i><color:blue>(add from V1.2020.7)</color></i>
]
@enduml
This is afolderYou can use separatorof different kindand styleThis is anodeYou can use separatorof different kindand styleThis is adatabaseYou can use separatorof different kindand styleThis is ausecaseYou can use separatorof different kindand styleThis is acardYou can use separatorof different kindand style(add from V1.2020.7)

08-02-01-1 Declaring-element-Actor

@startuml
actor actor1
:actor2:
@enduml
actor1actor2

08-02-02-1 Declaring-element-Component

@startuml
component component1
[component2]
@enduml
component1component2

08-02-03-1 Declaring-element-Interface

@startuml
interface interface1
() "interface2"
label "//interface example//"
@enduml
interface1interface2interface example

08-02-04-1 Declaring-element-Usecase

@startuml
usecase usecase1
(usecase2)
@enduml
usecase1usecase2

08-03-1 Linking-or-arrow

@startuml
node node1
node node2
node node3
node node4
node node5
node1 -- node2 : label1
node1 .. node3 : label2
node1 ~~ node4 : label3
node1 == node5
@enduml
node1node2node3node4node5label1label2label3

08-03-2 Linking-or-arrow

@startuml
artifact artifact1
artifact artifact2
artifact artifact3
artifact artifact4
artifact artifact5
artifact artifact6
artifact artifact7
artifact artifact8
artifact artifact9
artifact artifact10
artifact1 --> artifact2
artifact1 --* artifact3
artifact1 --o artifact4
artifact1 --+ artifact5
artifact1 --# artifact6
artifact1 -->> artifact7
artifact1 --0 artifact8
artifact1 --^ artifact9
artifact1 --(0 artifact10
@enduml
artifact1artifact2artifact3artifact4artifact5artifact6artifact7artifact8artifact9artifact10

08-03-3 Linking-or-arrow

@startuml
cloud cloud1
cloud cloud2
cloud cloud3
cloud cloud4
cloud cloud5
cloud1 -0- cloud2
cloud1 -0)- cloud3
cloud1 -(0- cloud4
cloud1 -(0)- cloud5
@enduml
cloud1cloud2cloud3cloud4cloud5

08-03-4 Linking-or-arrow

@startuml
actor foo1
actor foo2
foo1 <-0-> foo2
foo1 <-(0)-> foo2
(ac1) -le(0)-> left1
ac1 -ri(0)-> right1
ac1 .up(0).> up1
ac1 ~up(0)~> up2
ac1 -do(0)-> down1
ac1 -do(0)-> down2
actor1 -0)- actor2
component comp1
component comp2
comp1 *-0)-+ comp2
[comp3] <-->> [comp4]
@enduml
foo1foo2ac1left1right1up1up2down1down2actor1actor2comp1comp2comp3comp4

08-04-01-1 Bracketed-arrow-style-Line-style

@startuml
node foo
title Bracketed line style without label
foo --> bar
foo -[bold]-> bar1
foo -[dashed]-> bar2
foo -[dotted]-> bar3
foo -[hidden]-> bar4
foo -[plain]-> bar5
@enduml
Bracketed line style without labelfoobarbar1bar2bar3bar4bar5

08-04-01-2 Bracketed-arrow-style-Line-style

@startuml
title Bracketed line style with label
node foo
foo --> bar          : ?
foo -[bold]-> bar1   : [bold]
foo -[dashed]-> bar2 : [dashed]
foo -[dotted]-> bar3 : [dotted]
foo -[hidden]-> bar4 : [hidden]
foo -[plain]-> bar5  : [plain]
@enduml
Bracketed line style with labelfoobarbar1bar2bar3bar4bar5?[bold][dashed][dotted][plain]

08-04-02-1 Bracketed-arrow-style-Line-color

@startuml
title Bracketed line color
node foo
foo --> bar
foo -[#red]-> bar1   : [#red]
foo -[#green]-> bar2 : [#green]
foo -[#blue]-> bar3  : [#blue]
foo -[#blue;#yellow;#green]-> bar4
@enduml
Bracketed line colorfoobarbar1bar2bar3bar4[#red][#green][#blue]

08-04-03-1 Bracketed-arrow-style-Line-thickness

@startuml
title Bracketed line thickness
node foo
foo --> bar                : ?
foo -[thickness=1]-> bar1  : [1]
foo -[thickness=2]-> bar2  : [2]
foo -[thickness=4]-> bar3  : [4]
foo -[thickness=8]-> bar4  : [8]
foo -[thickness=16]-> bar5 : [16]
@enduml
Bracketed line thicknessfoobarbar1bar2bar3bar4bar5?[1][2][4][8][16]

08-04-04-1 Bracketed-arrow-style-Mix

@startuml
title Bracketed line style mix
node foo
foo --> bar                                   : ?
foo -[#red,thickness=1]-> bar1                : [#red,1]
foo -[#red,dashed,thickness=2]-> bar2         : [#red,dashed,2]
foo -[#green,dashed,thickness=4]-> bar3       : [#green,dashed,4]
foo -[#blue,dotted,thickness=8]-> bar4        : [blue,dotted,8]
foo -[#blue,plain,thickness=16]-> bar5        : [blue,plain,16]
foo -[#blue;#green,dashed,thickness=4]-> bar6 : [blue;green,dashed,4]
@enduml
Bracketed line style mixfoobarbar1bar2bar3bar4bar5bar6?[#red,1][#red,dashed,2][#green,dashed,4][blue,dotted,8][blue,plain,16][blue;green,dashed,4]

08-05-1 Change-arrow-color-and-style

@startuml
node foo
foo --> bar : normal
foo --> bar1 #line:red;line.bold;text:red  : red bold
foo --> bar2 #green;line.dashed;text:green : green dashed
foo --> bar3 #blue;line.dotted;text:blue   : blue dotted
@enduml
foobarbar1bar2bar3normalred boldgreen dashedblue dotted

08-06-1 Change-element-color-and-style

@startuml
agent a
cloud c #pink;line:red;line.bold;text:red
file  f #palegreen;line:green;line.dashed;text:green
node  n #aliceblue;line:blue;line.dotted;text:blue
@enduml
acfn

08-06-2 Change-element-color-and-style

@startuml
agent a
cloud c #pink;line:red;line.bold;text:red [
c
cloud description
]
file f #palegreen;line:green;line.dashed;text:green {
  [c1]
  [c2]
}
frame frame {
  node n #aliceblue;line:blue;line.dotted;text:blue
}
@enduml
fframec1c2naccloud description

08-07-1 Nestable-elements

@startuml
artifact artifact {
}
card card {
}
cloud cloud {
}
component component {
}
database database {
}
file file {
}
folder folder {
}
frame frame {
}
hexagon hexagon {
}
node node {
}
package package {
}
queue queue {
}
rectangle rectangle {
}
stack stack {
}
storage storage {
}
@enduml
artifactcardcloudcomponentdatabasefilefolderframehexagonnodepackagequeuerectanglestackstorage

08-08-01-1 Example-with-one-level

@startuml
artifact artifactVeryLOOOOOOOOOOOOOOOOOOOg as "artifact" {
  file f1
}
card cardVeryLOOOOOOOOOOOOOOOOOOOg as "card" {
file f2
}
cloud cloudVeryLOOOOOOOOOOOOOOOOOOOg as "cloud" {
  file f3
}
component componentVeryLOOOOOOOOOOOOOOOOOOOg as "component" {
file f4
}
database databaseVeryLOOOOOOOOOOOOOOOOOOOg as "database" {
  file f5
}
file fileVeryLOOOOOOOOOOOOOOOOOOOg as "file" {
  file f6
}
folder folderVeryLOOOOOOOOOOOOOOOOOOOg as "folder" {
  file f7
}
frame frameVeryLOOOOOOOOOOOOOOOOOOOg as "frame" {
  file f8
}
hexagon hexagonVeryLOOOOOOOOOOOOOOOOOOOg as "hexagon" {
file f9
}
node nodeVeryLOOOOOOOOOOOOOOOOOOOg as "node" {
  file f10
}
package packageVeryLOOOOOOOOOOOOOOOOOOOg as "package" {
  file f11
}
queue queueVeryLOOOOOOOOOOOOOOOOOOOg as "queue" {
file f12
}
rectangle rectangleVeryLOOOOOOOOOOOOOOOOOOOg as "rectangle" {
  file f13
}
stack stackVeryLOOOOOOOOOOOOOOOOOOOg as "stack" {
file f14
}
storage storageVeryLOOOOOOOOOOOOOOOOOOOg as "storage" {
  file f15
}
@enduml
artifactcardcloudcomponentdatabasefilefolderframehexagonnodepackagequeuerectanglestackstoragef1f2f3f4f5f6f7f8f9f10f11f12f13f14f15

08-08-02-1 Other-example

@startuml
artifact Foo1 {
  folder Foo2
}
folder Foo3 {
  artifact Foo4
}
frame Foo5 {
  database Foo6
}
cloud vpc {
  node ec2 {
    stack stack
  }
}
@enduml
Foo1Foo3Foo5vpcec2Foo2Foo4Foo6stack

08-08-02-2 Other-example

@startuml
node Foo1 {
  cloud Foo2
}
cloud Foo3 {
  frame Foo4
}
database Foo5 {
  storage Foo6
}
storage Foo7 {
  storage Foo8
}
@enduml
Foo1Foo3Foo5Foo7Foo2Foo4Foo6Foo8

08-08-03-1 Full-nesting

@startuml
artifact artifact {
  card card {
  cloud cloud {
    component component {
    database database {
      file file {
        folder folder {
          frame frame {
            hexagon hexagon {
            node node {
              package package {
                queue queue {
                rectangle rectangle {
                  stack stack {
                  storage storage {
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
}
}
}
}
}
@enduml
artifactcardcloudcomponentdatabasefilefolderframehexagonnodepackagequeuerectanglestackstorage

08-08-03-2 Full-nesting

@startuml
storage storage {
  stack stack {
  rectangle rectangle {
    queue queue {
    package package {
      node node {
        hexagon hexagon {
        frame frame {
          folder folder {
            file file {
              database database {
                component component {
                cloud cloud {
                  card card {
                  artifact artifact {
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
}
}
}
}
}
@enduml
storagestackrectanglequeuepackagenodehexagonframefolderfiledatabasecomponentcloudcardartifact

08-09-01-1 Simple-alias-with-as

@startuml
node Node1 as n1
node "Node 2" as n2
file f1 as "File 1"
cloud c1 as "this
is
a
cloud"
cloud c2 [this
is
another
cloud]
n1 -> n2
n1 --> f1
f1 -> c1
c1 -> c2
@enduml
Node1Node 2File 1thisisacloudthisisanothercloud

08-09-02-1 Examples-of-long-alias

@startuml
actor       "actor"       as actorVeryLOOOOOOOOOOOOOOOOOOOg
agent       "agent"       as agentVeryLOOOOOOOOOOOOOOOOOOOg
artifact    "artifact"    as artifactVeryLOOOOOOOOOOOOOOOOOOOg
boundary    "boundary"    as boundaryVeryLOOOOOOOOOOOOOOOOOOOg
card        "card"        as cardVeryLOOOOOOOOOOOOOOOOOOOg
cloud       "cloud"       as cloudVeryLOOOOOOOOOOOOOOOOOOOg
collections "collections" as collectionsVeryLOOOOOOOOOOOOOOOOOOOg
component   "component"   as componentVeryLOOOOOOOOOOOOOOOOOOOg
control     "control"     as controlVeryLOOOOOOOOOOOOOOOOOOOg
database    "database"    as databaseVeryLOOOOOOOOOOOOOOOOOOOg
entity      "entity"      as entityVeryLOOOOOOOOOOOOOOOOOOOg
file        "file"        as fileVeryLOOOOOOOOOOOOOOOOOOOg
folder      "folder"      as folderVeryLOOOOOOOOOOOOOOOOOOOg
frame       "frame"       as frameVeryLOOOOOOOOOOOOOOOOOOOg
hexagon     "hexagon"     as hexagonVeryLOOOOOOOOOOOOOOOOOOOg
interface   "interface"   as interfaceVeryLOOOOOOOOOOOOOOOOOOOg
label       "label"       as labelVeryLOOOOOOOOOOOOOOOOOOOg
node        "node"        as nodeVeryLOOOOOOOOOOOOOOOOOOOg
package     "package"     as packageVeryLOOOOOOOOOOOOOOOOOOOg
queue       "queue"       as queueVeryLOOOOOOOOOOOOOOOOOOOg
stack       "stack"       as stackVeryLOOOOOOOOOOOOOOOOOOOg
rectangle   "rectangle"   as rectangleVeryLOOOOOOOOOOOOOOOOOOOg
storage     "storage"     as storageVeryLOOOOOOOOOOOOOOOOOOOg
usecase     "usecase"     as usecaseVeryLOOOOOOOOOOOOOOOOOOOg
@enduml
actoragentartifactboundarycardcloudcollectionscomponentcontroldatabaseentityfilefolderframehexagoninterfacelabelnodepackageVeryLOOOOOOOOOOOOOOOOOOOgpackagequeuestackrectanglestorageusecase

08-09-02-2 Examples-of-long-alias

@startuml
actor       actorVeryLOOOOOOOOOOOOOOOOOOOg       as "actor"
agent       agentVeryLOOOOOOOOOOOOOOOOOOOg       as "agent"
artifact    artifactVeryLOOOOOOOOOOOOOOOOOOOg    as "artifact"
boundary    boundaryVeryLOOOOOOOOOOOOOOOOOOOg    as "boundary"
card        cardVeryLOOOOOOOOOOOOOOOOOOOg        as "card"
cloud       cloudVeryLOOOOOOOOOOOOOOOOOOOg       as "cloud"
collections collectionsVeryLOOOOOOOOOOOOOOOOOOOg as "collections"
component   componentVeryLOOOOOOOOOOOOOOOOOOOg   as "component"
control     controlVeryLOOOOOOOOOOOOOOOOOOOg     as "control"
database    databaseVeryLOOOOOOOOOOOOOOOOOOOg    as "database"
entity      entityVeryLOOOOOOOOOOOOOOOOOOOg      as "entity"
file        fileVeryLOOOOOOOOOOOOOOOOOOOg        as "file"
folder      folderVeryLOOOOOOOOOOOOOOOOOOOg      as "folder"
frame       frameVeryLOOOOOOOOOOOOOOOOOOOg       as "frame"
hexagon     hexagonVeryLOOOOOOOOOOOOOOOOOOOg     as "hexagon"
interface   interfaceVeryLOOOOOOOOOOOOOOOOOOOg   as "interface"
label       labelVeryLOOOOOOOOOOOOOOOOOOOg       as "label"
node        nodeVeryLOOOOOOOOOOOOOOOOOOOg        as "node"
package     packageVeryLOOOOOOOOOOOOOOOOOOOg     as "package"
queue       queueVeryLOOOOOOOOOOOOOOOOOOOg       as "queue"
stack       stackVeryLOOOOOOOOOOOOOOOOOOOg       as "stack"
rectangle   rectangleVeryLOOOOOOOOOOOOOOOOOOOg   as "rectangle"
storage     storageVeryLOOOOOOOOOOOOOOOOOOOg     as "storage"
usecase     usecaseVeryLOOOOOOOOOOOOOOOOOOOg     as "usecase"
@enduml
actoragentartifactboundarycardcloudcollectionscomponentcontroldatabaseentityfilefolderframehexagoninterfacelabelnodepackageVeryLOOOOOOOOOOOOOOOOOOOgpackagequeuestackrectanglestorageusecase

08-10-1 Round-corner

@startuml
skinparam rectangle {
  roundCorner<<Concept>> 25
}
rectangle "Concept Model" <<Concept>> {
  rectangle "Example 1" <<Concept>> as ex1
  rectangle "Another rectangle"
}
@enduml
«Concept»Concept Model«Concept»Example 1Another rectangle

08-11-01-1 Specific-SkinParameter-roundCorner

@startuml
skinparam roundCorner 15
actor actor
agent agent
artifact artifact
boundary boundary
card card
circle circle
cloud cloud
collections collections
component component
control control
database database
entity entity
file file
folder folder
frame frame
hexagon hexagon
interface interface
label label
node node
package package
queue queue
rectangle rectangle
stack stack
storage storage
usecase usecase
@enduml
actoragentartifactboundarycardcirclecloudcollectionscomponentcontroldatabaseentityfilefolderframehexagoninterfacelabelnodepackagequeuerectanglestackstorageusecase

08-12-1 Appendix-All-type-of-arrow-line

@startuml
left to right direction
skinparam nodesep 5

f3 ~~ b3 : ""~~""\n//dotted//
f2 .. b2 : ""..""\n//dashed//
f1 == b1 : ""==""\n//bold//
f0 -- b0 : ""--""\n//plain//
@enduml
f3b3f2b2f1b1f0b0~~dotted..dashed==bold--plain

08-13-01-1 Type-of-arrow-head

@startuml
left to right direction
skinparam nodesep 5

f13 --0   b13 : ""--0""
f12 --@   b12 : ""--@""
f11 --:|> b11 : ""--:|>""
f10 --||> b10 : ""--||>""
f9  --|>  b9  : ""--|>""
f8  --^   b8  : ""--^ ""
f7  --\\  b7  : ""--\\\\""
f6  --#   b6  : ""--# ""
f5  --+   b5  : ""--+ ""
f4  --o   b4  : ""--o ""
f3  --*   b3  : ""--* ""
f2  -->>  b2  : ""-->>""
f1  -->   b1  : ""--> ""
f0  --    b0  : ""-- ""
@enduml
f13b13f12b12f11b11f10b10f9b9f8b8f7b7f6b6f5b5f4b4f3b3f2b2f1b1f0b0--0--@--:|>--||>--|>--^--\\--#--+--o--*-->>-->--

08-13-02-1 Type-of-0-arrow-or-circle-arrow

@startuml
left to right direction
skinparam nodesep 5
f10 0--0   b10 : "" 0--0 ""
f9  )--(   b9  : "" )--(""
f8  0)--(0 b8  : "" 0)--(0""
f7  0)--   b7  : "" 0)-- ""
f6  -0)-   b6  : "" -0)-\n ""
f5  -(0)-  b5  : "" -(0)-\n""
f4  -(0-   b4  : "" -(0-\n ""
f3  --(0   b3  : "" --(0 ""
f2  --(    b2  : "" --( ""
f1  --0    b1  : "" --0 ""
@enduml
f10b10f9b9f8b8f7b7f6b6f5b5f4b4f3b3f2b2f1b10--0)--(0)--(00)---0)- -(0)- -(0- --(0--(--0

08-14-01-1 Simple-element

@startuml
actor actor #aliceblue;line:blue;line.dotted;text:blue
actor/ "actor/" #aliceblue;line:blue;line.dotted;text:blue
agent agent #aliceblue;line:blue;line.dotted;text:blue
artifact artifact #aliceblue;line:blue;line.dotted;text:blue
boundary boundary #aliceblue;line:blue;line.dotted;text:blue
card card #aliceblue;line:blue;line.dotted;text:blue
circle circle #aliceblue;line:blue;line.dotted;text:blue
cloud cloud #aliceblue;line:blue;line.dotted;text:blue
collections collections #aliceblue;line:blue;line.dotted;text:blue
component component #aliceblue;line:blue;line.dotted;text:blue
control control #aliceblue;line:blue;line.dotted;text:blue
database database #aliceblue;line:blue;line.dotted;text:blue
entity entity #aliceblue;line:blue;line.dotted;text:blue
file file #aliceblue;line:blue;line.dotted;text:blue
folder folder #aliceblue;line:blue;line.dotted;text:blue
frame frame #aliceblue;line:blue;line.dotted;text:blue
hexagon hexagon #aliceblue;line:blue;line.dotted;text:blue
interface interface #aliceblue;line:blue;line.dotted;text:blue
label label #aliceblue;line:blue;line.dotted;text:blue
node node #aliceblue;line:blue;line.dotted;text:blue
package package #aliceblue;line:blue;line.dotted;text:blue
queue queue #aliceblue;line:blue;line.dotted;text:blue
rectangle rectangle #aliceblue;line:blue;line.dotted;text:blue
stack stack #aliceblue;line:blue;line.dotted;text:blue
storage storage #aliceblue;line:blue;line.dotted;text:blue
usecase usecase #aliceblue;line:blue;line.dotted;text:blue
usecase/ "usecase/" #aliceblue;line:blue;line.dotted;text:blue
@enduml
actoractor/agentartifactboundarycardcirclecloudcollectionscomponentcontroldatabaseentityfilefolderframehexagoninterfacelabelnodepackagequeuerectanglestackstorageusecaseusecase/

08-14-03-1 Without-sub-element

@startuml
artifact artifact #aliceblue;line:blue;line.dotted;text:blue {
}
card card #aliceblue;line:blue;line.dotted;text:blue {
}
cloud cloud #aliceblue;line:blue;line.dotted;text:blue {
}
component component #aliceblue;line:blue;line.dotted;text:blue {
}
database database #aliceblue;line:blue;line.dotted;text:blue {
}
file file #aliceblue;line:blue;line.dotted;text:blue {
}
folder folder #aliceblue;line:blue;line.dotted;text:blue {
}
frame frame #aliceblue;line:blue;line.dotted;text:blue {
}
hexagon hexagon #aliceblue;line:blue;line.dotted;text:blue {
}
node node #aliceblue;line:blue;line.dotted;text:blue {
}
package package #aliceblue;line:blue;line.dotted;text:blue {
}
queue queue #aliceblue;line:blue;line.dotted;text:blue {
}
rectangle rectangle #aliceblue;line:blue;line.dotted;text:blue {
}
stack stack #aliceblue;line:blue;line.dotted;text:blue {
}
storage storage #aliceblue;line:blue;line.dotted;text:blue {
}
@enduml
artifactcardcloudcomponentdatabasefilefolderframehexagonnodepackagequeuerectanglestackstorage

08-14-04-1 With-sub-element

@startuml
artifact artifactVeryLOOOOOOOOOOOOOOOOOOOg as "artifact" #aliceblue;line:blue;line.dotted;text:blue {
  file f1
}
card cardVeryLOOOOOOOOOOOOOOOOOOOg as "card" #aliceblue;line:blue;line.dotted;text:blue {
file f2
}
cloud cloudVeryLOOOOOOOOOOOOOOOOOOOg as "cloud" #aliceblue;line:blue;line.dotted;text:blue {
  file f3
}
component componentVeryLOOOOOOOOOOOOOOOOOOOg as "component" #aliceblue;line:blue;line.dotted;text:blue {
file f4
}
database databaseVeryLOOOOOOOOOOOOOOOOOOOg as "database" #aliceblue;line:blue;line.dotted;text:blue {
  file f5
}
file fileVeryLOOOOOOOOOOOOOOOOOOOg as "file" #aliceblue;line:blue;line.dotted;text:blue {
  file f6
}
folder folderVeryLOOOOOOOOOOOOOOOOOOOg as "folder" #aliceblue;line:blue;line.dotted;text:blue {
  file f7
}
frame frameVeryLOOOOOOOOOOOOOOOOOOOg as "frame" #aliceblue;line:blue;line.dotted;text:blue {
  file f8
}
hexagon hexagonVeryLOOOOOOOOOOOOOOOOOOOg as "hexagon" #aliceblue;line:blue;line.dotted;text:blue {
file f9
}
node nodeVeryLOOOOOOOOOOOOOOOOOOOg as "node" #aliceblue;line:blue;line.dotted;text:blue {
  file f10
}
package packageVeryLOOOOOOOOOOOOOOOOOOOg as "package" #aliceblue;line:blue;line.dotted;text:blue {
  file f11
}
queue queueVeryLOOOOOOOOOOOOOOOOOOOg as "queue" #aliceblue;line:blue;line.dotted;text:blue {
file f12
}
rectangle rectangleVeryLOOOOOOOOOOOOOOOOOOOg as "rectangle" #aliceblue;line:blue;line.dotted;text:blue {
  file f13
}
stack stackVeryLOOOOOOOOOOOOOOOOOOOg as "stack" #aliceblue;line:blue;line.dotted;text:blue {
file f14
}
storage storageVeryLOOOOOOOOOOOOOOOOOOOg as "storage" #aliceblue;line:blue;line.dotted;text:blue {
  file f15
}
@enduml
artifactcardcloudcomponentdatabasefilefolderframehexagonnodepackagequeuerectanglestackstoragef1f2f3f4f5f6f7f8f9f10f11f12f13f14f15

08-15-02-1 Global-style-on-componentDiagram

@startuml
<style>
componentDiagram {
BackGroundColor palegreen
LineThickness 1
LineColor red
}
</style>
actor actor
actor/ "actor/"
agent agent
artifact artifact
boundary boundary
card card
circle circle
cloud cloud
collections collections
component component
control control
database database
entity entity
file file
folder folder
frame frame
hexagon hexagon
interface interface
label label
node node
package package
queue queue
rectangle rectangle
stack stack
storage storage
usecase usecase
usecase/ "usecase/"
@enduml
actoractor/agentartifactboundarycardcirclecloudcollectionscomponentcontroldatabaseentityfilefolderframehexagoninterfacelabelnodepackagequeuerectanglestackstorageusecaseusecase/

08-15-03-1 Style-for-each-element

@startuml
<style>
actor {
BackGroundColor #f80c12
LineThickness 1
LineColor black
}
agent {
BackGroundColor #f80c12
LineThickness 1
LineColor black
}
artifact {
  BackGroundColor #ee1100
  LineThickness 1
  LineColor black
}
boundary {
BackGroundColor #ee1100
LineThickness 1
LineColor black
}
card {
BackGroundColor #ff3311
LineThickness 1
LineColor black
}
circle {
BackGroundColor #ff3311
LineThickness 1
LineColor black
}
cloud {
  BackGroundColor #ff4422
  LineThickness 1
  LineColor black
}
collections {
BackGroundColor #ff4422
LineThickness 1
LineColor black
}
component {
BackGroundColor #ff6644
LineThickness 1
LineColor black
}
control {
BackGroundColor #ff6644
LineThickness 1
LineColor black
}
database {
  BackGroundColor #ff9933
  LineThickness 1
  LineColor black
}
entity {
  BackGroundColor #feae2d
  LineThickness 1
  LineColor black
}
file {
  BackGroundColor #feae2d
  LineThickness 1
  LineColor black
}
folder {
  BackGroundColor #ccbb33
  LineThickness 1
  LineColor black
}
frame {
  BackGroundColor #d0c310
  LineThickness 1
  LineColor black
}
hexagon {
BackGroundColor #aacc22
LineThickness 1
LineColor black
}
interface {
  BackGroundColor #69d025
  LineThickness 1
  LineColor black
}
label {
BackGroundColor black
LineThickness 1
LineColor black
}
node {
  BackGroundColor #22ccaa
  LineThickness 1
  LineColor black
}
package {
  BackGroundColor #12bdb9
  LineThickness 1
  LineColor black
}
queue {
BackGroundColor #11aabb
LineThickness 1
LineColor black
}
rectangle {
  BackGroundColor #4444dd
  LineThickness 1
  LineColor black
}
stack {
BackGroundColor #3311bb
LineThickness 1
LineColor black
}
storage {
  BackGroundColor #3b0cbd
  LineThickness 1
  LineColor black
}
usecase {
BackGroundColor #442299
LineThickness 1
LineColor black
}
</style>
actor actor
actor/ "actor/"
agent agent
artifact artifact
boundary boundary
card card
circle circle
cloud cloud
collections collections
component component
control control
database database
entity entity
file file
folder folder
frame frame
hexagon hexagon
interface interface
label label
node node
package package
queue queue
rectangle rectangle
stack stack
storage storage
usecase usecase
usecase/ "usecase/"
@enduml
actoractor/agentartifactboundarycardcirclecloudcollectionscomponentcontroldatabaseentityfilefolderframehexagoninterfacelabelnodepackagequeuerectanglestackstorageusecaseusecase/

08-15-05-1 Global-style-on-componentDiagram

@startuml
<style>
componentDiagram {
BackGroundColor palegreen
LineThickness 2
LineColor red
}
</style>
artifact artifact {
}
card card {
}
cloud cloud {
}
component component {
}
database database {
}
file file {
}
folder folder {
}
frame frame {
}
hexagon hexagon {
}
node node {
}
package package {
}
queue queue {
}
rectangle rectangle {
}
stack stack {
}
storage storage {
}
@enduml
artifactcardcloudcomponentdatabasefilefolderframehexagonnodepackagequeuerectanglestackstorage

08-15-06-1 Style-for-each-nested-element

@startuml
<style>
artifact {
  BackGroundColor #ee1100
  LineThickness 1
  LineColor black
}
card {
BackGroundColor #ff3311
LineThickness 1
LineColor black
}
cloud {
  BackGroundColor #ff4422
  LineThickness 1
  LineColor black
}
component {
BackGroundColor #ff6644
LineThickness 1
LineColor black
}
database {
  BackGroundColor #ff9933
  LineThickness 1
  LineColor black
}
file {
  BackGroundColor #feae2d
  LineThickness 1
  LineColor black
}
folder {
  BackGroundColor #ccbb33
  LineThickness 1
  LineColor black
}
frame {
  BackGroundColor #d0c310
  LineThickness 1
  LineColor black
}
hexagon {
BackGroundColor #aacc22
LineThickness 1
LineColor black
}
node {
  BackGroundColor #22ccaa
  LineThickness 1
  LineColor black
}
package {
  BackGroundColor #12bdb9
  LineThickness 1
  LineColor black
}
queue {
BackGroundColor #11aabb
LineThickness 1
LineColor black
}
rectangle {
  BackGroundColor #4444dd
  LineThickness 1
  LineColor black
}
stack {
BackGroundColor #3311bb
LineThickness 1
LineColor black
}
storage {
  BackGroundColor #3b0cbd
  LineThickness 1
  LineColor black
}
</style>
artifact artifact {
}
card card {
}
cloud cloud {
}
component component {
}
database database {
}
file file {
}
folder folder {
}
frame frame {
}
hexagon hexagon {
}
node node {
}
package package {
}
queue queue {
}
rectangle rectangle {
}
stack stack {
}
storage storage {
}
@enduml
artifactcardcloudcomponentdatabasefilefolderframehexagonnodepackagequeuerectanglestackstorage

08-15-08-1 Global-style-on-componentDiagram

@startuml
<style>
componentDiagram {
BackGroundColor palegreen
LineThickness 1
LineColor red
}
</style>
artifact e1 as "artifact" {
  file f1
}
card e2 as "card" {
file f2
}
cloud e3 as "cloud" {
  file f3
}
component e4 as "component" {
file f4
}
database e5 as "database" {
  file f5
}
file e6 as "file" {
  file f6
}
folder e7 as "folder" {
  file f7
}
frame e8 as "frame" {
  file f8
}
hexagon e9 as "hexagon" {
file f9
}
node e10 as "node" {
  file f10
}
package e11 as "package" {
  file f11
}
queue e12 as "queue" {
file f12
}
rectangle e13 as "rectangle" {
  file f13
}
stack e14 as "stack" {
file f14
}
storage e15 as "storage" {
  file f15
}
@enduml
artifactcardcloudcomponentdatabasefilefolderframehexagonnodepackagequeuerectanglestackstoragef1f2f3f4f5f6f7f8f9f10f11f12f13f14f15

08-15-09-1 Style-for-each-nested-element

@startuml
<style>
artifact {
  BackGroundColor #ee1100
  LineThickness 1
  LineColor black
}
card {
BackGroundColor #ff3311
LineThickness 1
LineColor black
}
cloud {
  BackGroundColor #ff4422
  LineThickness 1
  LineColor black
}
component {
BackGroundColor #ff6644
LineThickness 1
LineColor black
}
database {
  BackGroundColor #ff9933
  LineThickness 1
  LineColor black
}
file {
  BackGroundColor #feae2d
  LineThickness 1
  LineColor black
}
folder {
  BackGroundColor #ccbb33
  LineThickness 1
  LineColor black
}
frame {
  BackGroundColor #d0c310
  LineThickness 1
  LineColor black
}
hexagon {
BackGroundColor #aacc22
LineThickness 1
LineColor black
}
node {
  BackGroundColor #22ccaa
  LineThickness 1
  LineColor black
}
package {
  BackGroundColor #12bdb9
  LineThickness 1
  LineColor black
}
queue {
BackGroundColor #11aabb
LineThickness 1
LineColor black
}
rectangle {
  BackGroundColor #4444dd
  LineThickness 1
  LineColor black
}
stack {
BackGroundColor #3311bb
LineThickness 1
LineColor black
}
storage {
  BackGroundColor #3b0cbd
  LineThickness 1
  LineColor black
}
</style>
artifact e1 as "artifact" {
  file f1
}
card e2 as "card" {
file f2
}
cloud e3 as "cloud" {
  file f3
}
component e4 as "component" {
file f4
}
database e5 as "database" {
  file f5
}
file e6 as "file" {
  file f6
}
folder e7 as "folder" {
  file f7
}
frame e8 as "frame" {
  file f8
}
hexagon e9 as "hexagon" {
file f9
}
node e10 as "node" {
  file f10
}
package e11 as "package" {
  file f11
}
queue e12 as "queue" {
file f12
}
rectangle e13 as "rectangle" {
  file f13
}
stack e14 as "stack" {
file f14
}
storage e15 as "storage" {
  file f15
}
@enduml
artifactcardcloudcomponentdatabasefilefolderframehexagonnodepackagequeuerectanglestackstoragef1f2f3f4f5f6f7f8f9f10f11f12f13f14f15

09-01-1 Simple State

@startuml
[*] --> State1
State1 --> [*]
State1 : this is a string
State1 : this is another string
State1 -> State2
State2 --> [*]
@enduml
State1this is a stringthis is another stringState2

09-02-1 Change state rendering

@startuml
hide empty description
[*] --> State1
State1 --> [*]
State1 : this is a string
State1 : this is another string
State1 -> State2
State2 --> [*]
@enduml
State1this is a stringthis is another stringState2

09-03-01-1 Internal-sub-state

@startuml
scale 350 width
[*] --> NotShooting
state NotShooting {
  [*] --> Idle
  Idle --> Configuring : EvConfig
  Configuring --> Idle : EvConfig
}
state Configuring {
  [*] --> NewValueSelection
  NewValueSelection --> NewValuePreview : EvNewValue
  NewValuePreview --> NewValueSelection : EvNewValueRejected
  NewValuePreview --> NewValueSelection : EvNewValueSaved
  state NewValuePreview {
    State1 -> State2
  }
}
@enduml
NotShootingIdleConfiguringNewValueSelectionNewValuePreviewState1State2EvNewValueEvNewValueRejectedEvNewValueSavedEvConfigEvConfig

09-03-02-1 Sub-state-to-sub-state

@startuml
state A {
  state X {
  }
  state Y {
  }
}
state B {
  state Z {
  }
}
X --> Z
Z --> Y
@enduml
ABXYZ

09-04-1 Long name

@startuml
scale 600 width
[*] -> State1
State1 --> State2 : Succeeded
State1 --> [*] : Aborted
State2 --> State3 : Succeeded
State2 --> [*] : Aborted
state State3 {
  state "Accumulate Enough Data\nLong State Name" as long1
  long1 : Just a test
  [*] --> long1
  long1 --> long1 : New Data
  long1 --> ProcessData : Enough Data
}
State3 --> State3 : Failed
State3 --> [*] : Succeeded / Save Result
State3 --> [*] : Aborted
@enduml
State1State2State3Accumulate Enough DataLong State NameJust a testProcessDataNew DataEnough DataSucceededAbortedSucceededAbortedFailedSucceeded / Save ResultAborted

09-05-1 History

@startuml
[*] -> State1
State1 --> State2 : Succeeded
State1 --> [*] : Aborted
State2 --> State3 : Succeeded
State2 --> [*] : Aborted
state State3 {
  state "Accumulate Enough Data" as long1
  long1 : Just a test
  [*] --> long1
  long1 --> long1 : New Data
  long1 --> ProcessData : Enough Data
  State2 --> [H]: Resume
}
State3 --> State2 : Pause
State2 --> State3[H*]: DeepResume
State3 --> State3 : Failed
State3 --> [*] : Succeeded / Save Result
State3 --> [*] : Aborted
@enduml
State3Accumulate Enough DataJust a testProcessDataHH*State1State2SucceededAbortedSucceededPauseAbortedNew DataEnough DataResumeDeepResumeFailedSucceeded / Save ResultAborted

09-06-1 Fork

@startuml
state fork_state <<fork>>
[*] --> fork_state
fork_state --> State2
fork_state --> State3
state join_state <<join>>
State2 --> join_state
State3 --> join_state
join_state --> State4
State4 --> [*]
@enduml
State2State3State4

09-07-01-1 Horizontal-separator---

@startuml
[*] --> Active
state Active {
  [*] -> NumLockOff
  NumLockOff --> NumLockOn : EvNumLockPressed
  NumLockOn --> NumLockOff : EvNumLockPressed
  --
  [*] -> CapsLockOff
  CapsLockOff --> CapsLockOn : EvCapsLockPressed
  CapsLockOn --> CapsLockOff : EvCapsLockPressed
  --
  [*] -> ScrollLockOff
  ScrollLockOff --> ScrollLockOn : EvCapsLockPressed
  ScrollLockOn --> ScrollLockOff : EvCapsLockPressed
}
@enduml
ActiveNumLockOffNumLockOnEvNumLockPressedEvNumLockPressedCapsLockOffCapsLockOnEvCapsLockPressedEvCapsLockPressedScrollLockOffScrollLockOnEvCapsLockPressedEvCapsLockPressed

09-07-02-1 Vertical-separator

@startuml
[*] --> Active
state Active {
  [*] -> NumLockOff
  NumLockOff --> NumLockOn : EvNumLockPressed
  NumLockOn --> NumLockOff : EvNumLockPressed
  ||
  [*] -> CapsLockOff
  CapsLockOff --> CapsLockOn : EvCapsLockPressed
  CapsLockOn --> CapsLockOff : EvCapsLockPressed
  ||
  [*] -> ScrollLockOff
  ScrollLockOff --> ScrollLockOn : EvCapsLockPressed
  ScrollLockOn --> ScrollLockOff : EvCapsLockPressed
}
@enduml
ActiveNumLockOffNumLockOnEvNumLockPressedEvNumLockPressedCapsLockOffCapsLockOnEvCapsLockPressedEvCapsLockPressedScrollLockOffScrollLockOnEvCapsLockPressedEvCapsLockPressed

09-08-1 Conditional

@startuml
state "Req(Id)" as ReqId <<sdlreceive>>
state "Minor(Id)" as MinorId
state "Major(Id)" as MajorId
state c <<choice>>
Idle --> ReqId
ReqId --> c
c --> MinorId : [Id <= 10]
c --> MajorId : [Id > 10]
@enduml
Req(Id)Minor(Id)Major(Id)Idle[Id <= 10][Id > 10]

09-09-1 Stereotypes-full-example

@startuml
state choice1 <<choice>>
state fork1 <<fork>>
state join2 <<join>>
state end3 <<end>>
[*] --> choice1 : from start\nto choice
choice1 --> fork1 : from choice\nto fork
choice1 --> join2 : from choice\nto join
choice1 --> end3 : from choice\nto end
fork1 ---> State1 : from fork\nto state
fork1 --> State2 : from fork\nto state
State2 --> join2 : from state\nto join
State1 --> [*] : from state\nto end
join2 --> [*] : from join\nto end
@enduml
State1State2from startto choicefrom choiceto forkfrom choiceto joinfrom choiceto endfrom forkto statefrom forkto statefrom stateto joinfrom stateto endfrom jointo end

09-10-1 Point

@startuml
state Somp {
  state entry1 <<entryPoint>>
  state entry2 <<entryPoint>>
  state sin
  entry1 --> sin
  entry2 -> sin
  sin -> sin2
  sin2 --> exitA <<exitPoint>>
}
[*] --> entry1
exitA --> Foo
Foo1 -> entry2
@enduml
Sompentry1entry2sinsin2exitAFooFoo1

09-11-1 Pin

@startuml
state Somp {
  state entry1 <<inputPin>>
  state entry2 <<inputPin>>
  state sin
  entry1 --> sin
  entry2 -> sin
  sin -> sin2
  sin2 --> exitA <<outputPin>>
}
[*] --> entry1
exitA --> Foo
Foo1 -> entry2
@enduml
Sompentry1entry2sinsin2exitAFooFoo1

09-12-1 Expansion

@startuml
state Somp {
  state entry1 <<expansionInput>>
  state entry2 <<expansionInput>>
  state sin
  entry1 --> sin
  entry2 -> sin
  sin -> sin2
  sin2 --> exitA <<expansionOutput>>
}
[*] --> entry1
exitA --> Foo
Foo1 -> entry2
@enduml
Sompentry1entry2sinsin2exitAFooFoo1

09-13-1 Arrow direction

@startuml
[*] -up-> First
First -right-> Second
Second --> Third
Third -left-> Last
@enduml
FirstSecondThirdLast

09-14-1 Change-line-color-and-style

@startuml
State S1
State S2
S1 -[#DD00AA]-> S2
S1 -left[#yellow]-> S3
S1 -up[#red,dashed]-> S4
S1 -right[dotted,#blue]-> S5
X1 -[dashed]-> X2
Z1 -[dotted]-> Z2
Y1 -[#blue,bold]-> Y2
@enduml
S1S2S3S4S5X1X2Z1Z2Y1Y2

09-15-1 Note

@startuml
[*] --> Active
Active --> Inactive
note left of Active : this is a short\nnote
note right of Inactive
  A note can also
  be defined on
  several lines
end note
@enduml
ActiveInactivethis is a shortnoteA note can alsobe defined onseveral lines

09-15-2 Note

@startuml
state foo
note "This is a floating note" as N1
@enduml
fooThis is a floating note

09-16-1 More in notes

@startuml
[*] --> NotShooting
state "Not Shooting State" as NotShooting {
  state "Idle mode" as Idle
  state "Configuring mode" as Configuring
  [*] --> Idle
  Idle --> Configuring : EvConfig
  Configuring --> Idle : EvConfig
}
note right of NotShooting : This is a note on a composite state
@enduml
Not Shooting StateIdle modeConfiguring modeEvConfigEvConfigThis is a note on a composite state

09-17-1 More-in-notes

@startuml
[*] --> NotShooting
state "Not Shooting State" as NotShooting {
  state "Idle mode" as Idle
  state "Configuring mode" as Configuring
  [*] --> Idle
  Idle --> Configuring : EvConfig
  Configuring --> Idle : EvConfig
}
note right of NotShooting : This is a note on a composite state
@enduml
Not Shooting StateIdle modeConfiguring modeEvConfigEvConfigThis is a note on a composite state

09-18-1 Inline-color

@startuml
state CurrentSite #pink {
  state HardwareSetup #lightblue {
    state Site #brown
    Site -[hidden]-> Controller
    Controller -[hidden]-> Devices
  }
  state PresentationSetup{
    Groups -[hidden]-> PlansAndGraphics
  }
  state Trends #FFFF77
  state Schedule #magenta
  state AlarmSupression
}
@enduml
CurrentSiteHardwareSetupSiteControllerDevicesPresentationSetupGroupsPlansAndGraphicsTrendsScheduleAlarmSupression

09-19-1 Skinparam

@startuml
skinparam backgroundColor LightYellow
skinparam state {
  StartColor MediumBlue
  EndColor Red
  BackgroundColor Peru
  BackgroundColor<<Warning>> Olive
  BorderColor Gray
  FontName Impact
}
[*] --> NotShooting
state "Not Shooting State" as NotShooting {
  state "Idle mode" as Idle <<Warning>>
  state "Configuring mode" as Configuring
  [*] --> Idle
  Idle --> Configuring : EvConfig
  Configuring --> Idle : EvConfig
}
NotShooting --> [*]
@enduml
Not Shooting StateIdle modeConfiguring modeEvConfigEvConfig

09-20-1 Changing-style

@startuml
<style>
stateDiagram {
BackgroundColor Peru
'LineColor Gray
FontName Impact
FontColor Red
arrow {
FontSize 13
LineColor Blue
  }
}
</style>

[*] --> NotShooting
state "Not Shooting State" as NotShooting {
  state "Idle mode" as Idle <<Warning>>
  state "Configuring mode" as Configuring
  [*] --> Idle
  Idle --> Configuring : EvConfig
  Configuring --> Idle : EvConfig
}

NotShooting --> [*]
@enduml
Not Shooting StateIdle modeConfiguring modeEvConfigEvConfig

09-21-1 Change-state-color-and-style

@startuml
state FooGradient #red-green ##00FFFF
state FooDashed #red|green ##[dashed]blue {
}
state FooDotted ##[dotted]blue {
}
state FooBold ##[bold] {
}
state Foo1 ##[dotted]green {
  state inner1 ##[dotted]yellow
}
state out ##[dotted]gold
state Foo2 ##[bold]green {
  state inner2 ##[dotted]yellow
}
inner1 -> inner2
out -> inner2
@enduml
Foo1Foo2inner1inner2FooGradientFooDashedFooDottedFooBoldout

09-21-2 Change-state-color-and-style

@startuml
state FooGradient #red-green;line:00FFFF
state FooDashed #red|green;line.dashed;line:blue {
}
state FooDotted #line.dotted;line:blue {
}
state FooBold #line.bold {
}
state Foo1 #line.dotted;line:green {
  state inner1 #line.dotted;line:yellow
}
state out #line.dotted;line:gold
state Foo2 #line.bold;line:green {
  state inner2 #line.dotted;line:yellow
}
inner1 -> inner2
out -> inner2
@enduml
Foo1Foo2inner1inner2FooGradientFooDashedFooDottedFooBoldout

09-21-3 Change-state-color-and-style

@startuml
state s1 : s1 description
state s2 #pink;line:red;line.bold;text:red : s2 description
state s3 #palegreen;line:green;line.dashed;text:green : s3 description
state s4 #aliceblue;line:blue;line.dotted;text:blue : s4 description
@enduml
s1s1 descriptions2s2 descriptions3s3 descriptions4s4 description

10-01-1 Declaring-participant

@startuml
robust "Web Browser" as WB
concise "Web User" as WU
@0
WU is Idle
WB is Idle
@100
WU is Waiting
WB is Processing
@300
WB is Waiting
@enduml
Web BrowserIdleProcessingWaitingWeb UserIdleWaiting0100300

10-02-1 Binary-and-Clock

@startuml
clock clk with period 1
binary "Enable" as EN
@0
EN is low
@5
EN is high
@10
EN is low
@enduml
Enable01510

10-03-1 Adding-message

@startuml
robust "Web Browser" as WB
concise "Web User" as WU
@0
WU is Idle
WB is Idle
@100
WU -> WB : URL
WU is Waiting
WB is Processing
@300
WB is Waiting
@enduml
Web BrowserIdleProcessingWaitingWeb UserIdleWaiting0100300URL

10-04-1 Relative-time

@startuml
robust "DNS Resolver" as DNS
robust "Web Browser" as WB
concise "Web User" as WU

@0
WU is Idle
WB is Idle
DNS is Idle

@+100
WU -> WB : URL
WU is Waiting
WB is Processing

@+200
WB is Waiting
WB -> DNS@+50 : Resolve URL

@+100
DNS is Processing

@+300
DNS is Idle
@enduml
DNS ResolverIdleProcessingWeb BrowserIdleProcessingWaitingWeb UserIdleWaiting0100300400700URLResolve URL

10-05-1 Anchor-Points

@startuml
clock clk with period 1
binary "enable" as EN
concise "dataBus" as db
@0 as :start
@5 as :en_high
@10 as :en_low
@:start
EN is low
db is "0x0000"
@:en_high
EN is high
@:en_low
EN is low
@:en_high-2
db is "0xf23a"
@:en_high+6
db is "0x0000"
@enduml
enabledataBus0x00000xf23a0x000001351011

10-06-1 Participant-oriented

@startuml
robust "Web Browser" as WB
concise "Web User" as WU
@WB
0 is idle
+200 is Proc.
+100 is Waiting
@WU
0 is Waiting
+500 is ok
@enduml
Web BrowseridleProc.WaitingWeb UserWaitingok0200300500

10-07-1 Setting-scale

@startuml
concise "Web User" as WU
scale 100 as 50 pixels
@WU
0 is Waiting
+500 is ok
@enduml
Web UserWaitingok0100200300400500600

10-08-1 Initial-state

@startuml
robust "Web Browser" as WB
concise "Web User" as WU
WB is Initializing
WU is Absent
@WB
0 is idle
+200 is Processing
+100 is Waiting
@WU
0 is Waiting
+500 is ok
@enduml
Web BrowserInitializingidleProcessingWaitingWeb UserAbsentWaitingok0200300500

10-09-1 Intricated-state

@startuml
robust "Signal1" as S1
robust "Signal2" as S2
S1 has 0,1,2,hello
S2 has 0,1,2
@0
S1 is 0
S2 is 0
@100
S1 is {0,1} #SlateGrey
S2 is {0,1}
@200
S1 is 1
S2 is 0
@300
S1 is hello
S2 is {0,2}
@enduml
Signal1hello210Signal22100100200300

10-10-1 Hidden-state

@startuml
concise "Web User" as WU
@0
WU is {-}
@100
WU is A1
@200
WU is {-}
@300
WU is {hidden}
@400
WU is A3
@500
WU is {-}
@enduml
Web UserA1A30100200300400500

10-11-1 Hide-time-axis

@startuml
hide time-axis
concise "Web User" as WU
WU is Absent
@WU
0 is Waiting
+500 is ok
@enduml
Web UserAbsentWaitingok

10-12-1 Using-Time-and-Date

@startuml
robust "Web Browser" as WB
concise "Web User" as WU
@2019/07/02
WU is Idle
WB is Idle
@2019/07/04
WU is Waiting : some note
WB is Processing : some other note
@2019/07/05
WB is Waiting
@enduml
Web BrowserIdleProcessingWaitingsome other noteWeb UserIdleWaitingsome note07/0207/0407/05

10-12-2 Using-Time-and-Date

@startuml
robust "Web Browser" as WB
concise "Web User" as WU
@1:15:00
WU is Idle
WB is Idle
@1:16:30
WU is Waiting : some note
WB is Processing : some other note
@1:17:30
WB is Waiting
@enduml
Web BrowserIdleProcessingWaitingsome other noteWeb UserIdleWaitingsome note1:15:001:16:301:17:30

10-13-1 Adding-constraint

@startuml
robust "Web Browser" as WB
concise "Web User" as WU
WB is Initializing
WU is Absent
@WB
0 is idle
+200 is Processing
+100 is Waiting
WB@0 <-> @50 : {50 ms lag}
@WU
0 is Waiting
+500 is ok
@200 <-> @+150 : {150 ms}
@enduml
Web BrowserInitializingidleProcessingWaiting{50 ms lag}Web UserAbsentWaitingok{150 ms}0200300500

10-14-1 Highlighted-period

@startuml
robust "Web Browser" as WB
concise "Web User" as WU
@0
WU is Idle
WB is Idle
@100
WU -> WB : URL
WU is Waiting #LightCyan;line:Aqua
@200
WB is Proc.
@300
WU -> WB@350 : URL2
WB is Waiting
@+200
WU is ok
@+200
WB is Idle
highlight 200 to 450 #Gold;line:DimGrey : This is my caption
@enduml
Web BrowserIdleProc.WaitingWeb UserIdleWaitingok0100200300500700URLURL2This is my caption

10-15-1 Adding-texts

@startuml
Title this is my title
header: some header
footer: some footer
legend
  Some legend
end legend
caption some caption
robust "Web Browser" as WB
concise "Web User" as WU
@0
WU is Idle
WB is Idle
@100
WU is Waiting
WB is Processing
@300
WB is Waiting
@enduml
some headerthis is my titleWeb BrowserIdleProcessingWaitingWeb UserIdleWaiting0100300Some legendsome captionsome footer

10-16-1 Complete-example

@startuml
concise "Client" as Client
concise "Server" as Server
concise "Response freshness" as Cache
Server is idle
Client is idle
@Client
0 is send
Client -> Server@+25 : GET
+25 is await
+75 is recv
+25 is idle
+25 is send
Client -> Server@+25 : GET\nIf-Modified-Since: 150
+25 is await
+50 is recv
+25 is idle
@100 <-> @275 : no need to re-request from server
@Server
25 is recv
+25 is work
+25 is send
Server -> Client@+25 : 200 OK\nExpires: 275
+25 is idle
+75 is recv
+25 is send
Server -> Client@+25 : 304 Not Modified
+25 is idle
@Cache
75 is fresh
+200 is stale
@enduml
Clientidlesendawaitrecvidlesendawaitrecvidleno need to re-request from serverServeridlerecvworksendidlerecvsendidleResponse freshnessfreshstale0255075100125150175200225250275GETGETIf-Modified-Since: 150200 OKExpires: 275304 Not Modified

10-17-1 Digital-Example

@startuml
scale 5 as 150 pixels
clock clk with period 1
binary "enable" as en
binary "R/W" as rw
binary "data Valid" as dv
concise "dataBus" as db
concise "address bus" as addr
@6 as :write_beg
@10 as :write_end
@15 as :read_beg
@19 as :read_end
@0
en is low
db is "0x0"
addr is "0x03f"
rw is low
dv is 0
@:write_beg-3
en is high
@:write_beg-2
db is "0xDEADBEEF"
@:write_beg-1
dv is 1
@:write_beg
rw is high
@:write_end
rw is low
dv is low
@:write_end+1
rw is low
db is "0x0"
addr is "0x23"
@12
dv is high
@13
db is "0xFFFF"
@20
en is low
dv is low
@21
db is "0x0"
highlight :write_beg to :write_end #Gold:Write
highlight :read_beg to :read_end #lightBlue:Read
db@:write_beg-1 <-> @:write_end : setup time
db@:write_beg-1 -> addr@:write_end+1 : hold
@enduml
enableR/Wdata ValiddataBus0x00xDEADBEEF0x00xFFFF0x0setup timeaddress bus0x03f0x230510152025holdWriteRead

10-18-1 Adding-color

@startuml
concise "LR" as LR
concise "ST" as ST
LR is AtPlace #palegreen
ST is AtLoad #gray
@LR
0 is Lowering
100 is Lowered #pink
350 is Releasing
@ST
200 is Moving
@enduml
LRAtPlaceLoweringLoweredReleasingSTAtLoadMoving0100200350

11-01-01-1 Complex-example

@startjson
{
  "firstName": "John",
  "lastName": "Smith",
  "isAlive": true,
  "age": 27,
  "address": {
    "streetAddress": "21 2nd Street",
    "city": "New York",
    "state": "NY",
    "postalCode": "10021-3100"
  },
  "phoneNumbers": [
    {
      "type": "home",
      "number": "212 555-1234"
    },
    {
      "type": "office",
      "number": "646 555-4567"
    }
  ],
  "children": [],
  "spouse": null
}
@endjson
firstNameJohnlastNameSmithisAlive☑ trueage27address   phoneNumbers   children   spousestreetAddress21 2nd StreetcityNew YorkstateNYpostalCode10021-3100      typehomenumber212 555-1234typeofficenumber646 555-4567

11-01-1 Display-JSON-Data

@startjson
{
  "fruit":"Apple",
  "size":"Large",
  "color":"Red"
}
@endjson
fruitApplesizeLargecolorRed

11-02-1 Highlight-parts

@startjson
#highlight "lastName"
#highlight "address" / "city"
#highlight "phoneNumbers" / "0" / "number"
{
  "firstName": "John",
  "lastName": "Smith",
  "isAlive": true,
  "age": 28,
  "address": {
    "streetAddress": "21 2nd Street",
    "city": "New York",
    "state": "NY",
    "postalCode": "10021-3100"
  },
  "phoneNumbers": [
    {
      "type": "home",
      "number": "212 555-1234"
    },
    {
      "type": "office",
      "number": "646 555-4567"
    }
  ],
  "children": [],
  "spouse": null
}
@endjson
firstNameJohnlastNameSmithisAlive☑ trueage28address   phoneNumbers   children   spousestreetAddress21 2nd StreetcityNew YorkstateNYpostalCode10021-3100      typehomenumber212 555-1234typeofficenumber646 555-4567

11-03-01-1 Synthesis-of-all-JSON-basic-element

@startjson
{
"null": null,
"true": true,
"false": false,
"JSON_Number": [-1, -1.1, "<color:green>TBC"],
"JSON_String": "a\nb\rc\td <color:green>TBC...",
"JSON_Object": {
  "{}": {},
  "k_int": 123,
  "k_str": "abc",
  "k_obj": {"k": "v"}
},
"JSON_Array" : [
  [],
  [true, false],
  [-1, 1],
  ["a", "b", "c"],
  ["mix", null, true, 1, {"k": "v"}]
]
}
@endjson
nulltrue☑ truefalse☐ falseJSON_Number   JSON_Stringa b cdTBC...JSON_Object   JSON_Array   -1-1.1TBC{}   k_int123k_strabck_obj   kv               ☑ true☐ false-11abcmix☑ true1   kv

11-04-01-1 Array-type

@startjson
{
"Numeric": [1, 2, 3],
"String ": ["v1a", "v2b", "v3c"],
"Boolean": [true, false, true]
}
@endjson
Numeric   String   Boolean   123v1av2bv3c☑ true☐ false☑ true

11-04-03-1 Number-array

@startjson
[1, 2, 3]
@endjson
123

11-04-04-1 String-array

@startjson
["1a", "2b", "3c"]
@endjson
1a2b3c

11-04-05-1 Boolean-array

@startjson
[true, false, true]
@endjson
☑ true☐ false☑ true

11-05-1 JSON-numbers

@startjson
{
"DecimalNumber": [-1, 0, 1],
"DecimalNumber . Digits": [-1.1, 0.1, 1.1],
"DecimalNumber ExponentPart": [1E5]
}
@endjson
DecimalNumber   DecimalNumber . Digits   DecimalNumber ExponentPart   -101-1.10.11.11E5

11-06-01-1 JSON-Unicode

@startjson
{
"<color:blue><b>code": "<color:blue><b>value",
"a\\u005Cb":           "a\u005Cb",
"\\uD83D\\uDE10":      "\uD83D\uDE10",
"😐":                  "😐"
}
@endjson
codevaluea\u005Cba\b\uD83D\uDE10😐😐😐

11-06-02-1 JSON-two-character-escape-sequence

@startjson
{
"**legend**: character name":              ["**two-character escape sequence**", "example (between 'a' and 'b')"],
"quotation mark character (U+0022)":       ["\\\"", "a\"b"],
"reverse solidus character (U+005C)":      ["\\\\", "a\\b"],
"solidus character (U+002F)":              ["\\\/", "a\/b"],
"backspace character (U+0008)":            ["\\b", "a\bb"],
"form feed character (U+000C)":            ["\\f", "a\fb"],
"line feed character (U+000A)":            ["\\n", "a\nb"],
"carriage return character (U+000D)":      ["\\r", "a\rb"],
"character tabulation character (U+0009)": ["\\t", "a\tb"]
}
@endjson
legend: character name   quotation mark character (U+0022)   reverse solidus character (U+005C)   solidus character (U+002F)   backspace character (U+0008)   form feed character (U+000C)   line feed character (U+000A)   carriage return character (U+000D)   character tabulation character (U+0009)   two-character escape sequenceexample (between 'a' and 'b')\"a"b\a\b\/a/b\bab\fa b  a b  a bab

11-06-02-2 JSON-two-character-escape-sequence

@startjson
[
"\\\\",
"\\n",
"\\r",
"\\t"
]
@endjson
\    

11-07-1 Minimal-JSON-examples

@startjson
"Hello world!"
@endjson
Hello world!

11-07-2 Minimal-JSON-examples

@startjson
42
@endjson
42

11-07-3 Minimal-JSON-examples

@startjson
true
@endjson
☑ true

11-08-01-1 Without-style

@startjson
#highlight "1" / "hr"
[
  {
   "name": "Mark McGwire",
   "hr": 65,
   "avg": 0.278
  },
  {
    "name": "Sammy Sosa",
    "hr": 63,
    "avg": 0.288
  }
]
@endjson
      nameMark McGwirehr65avg0.278nameSammy Sosahr63avg0.288

11-08-02-1 With-style

@startjson
<style>
jsonDiagram {
  node {
    BackGroundColor Khaki
    LineColor lightblue
    FontName Helvetica
    FontColor red
    FontSize 18
    FontStyle bold
    RoundCorner 0
    LineThickness 2
    LineStyle 10;5
    separator {
      LineThickness 0.5
      LineColor black
      LineStyle 1;5
    }
  }
  arrow {
    BackGroundColor lightblue
    LineColor green
    LineThickness 2
    LineStyle 2;5
  }
  highlight {
    BackGroundColor red
    FontColor white
    FontStyle italic
  }
}
</style>
#highlight "1" / "hr"
[
  {
    "name": "Mark McGwire",
    "hr": 65,
    "avg": 0.278
  },
  {
    "name": "Sammy Sosa",
    "hr": 63,
    "avg": 0.288
  }
]
@endjson
      nameMark McGwirehr65avg0.278nameSammy Sosahr63avg0.288

12-01-1 Complex-example

@startyaml
doe: "a deer, a female deer"
ray: "a drop of golden sun"
pi: 3.14159
xmas: true
french-hens: 3
calling-birds:
  - huey
  - dewey
  - louie
  - fred
xmas-fifth-day:
  calling-birds: four
  french-hens: 3
  golden-rings: 5
  partridges:
    count: 1
    location: "a pear tree"
  turtle-doves: two
@endyaml
doea deer, a female deerraya drop of golden sunpi3.14159xmastruefrench-hens3calling-birds   xmas-fifth-day   hueydeweylouiefredcalling-birdsfourfrench-hens3golden-rings5partridges   turtle-dovestwocount1locationa pear tree

12-02-1 Specific-key-with-symbols-or-unicode

@startyaml
@fruit: Apple
$size: Large
&color: Red
❤: Heart
‰: Per mille
@endyaml

@fruitApple$sizeLarge&colorRedHeartPer mille

12-03-01-1 Normal-style

@startyaml
#highlight "french-hens"
#highlight "xmas-fifth-day" / "partridges"

doe: "a deer, a female deer"
ray: "a drop of golden sun"
pi: 3.14159
xmas: true
french-hens: 3
calling-birds: 
  - huey
  - dewey
  - louie
  - fred
xmas-fifth-day: 
  calling-birds: four
  french-hens: 3
  golden-rings: 5
  partridges: 
    count: 1
    location: "a pear tree"
  turtle-doves: two
@endyaml

doea deer, a female deerraya drop of golden sunpi3.14159xmastruefrench-hens3calling-birds   xmas-fifth-day   hueydeweylouiefredcalling-birdsfourfrench-hens3golden-rings5partridges   turtle-dovestwocount1locationa pear tree

12-03-02-1 Customised-style

@startyaml
<style>
yamlDiagram {
    highlight {
      BackGroundColor red
      FontColor white
      FontStyle italic
    }
}
</style>
#highlight "french-hens"
#highlight "xmas-fifth-day" / "partridges"

doe: "a deer, a female deer"
ray: "a drop of golden sun"
pi: 3.14159
xmas: true
french-hens: 3
calling-birds: 
  - huey
  - dewey
  - louie
  - fred
xmas-fifth-day: 
  calling-birds: four
  french-hens: 3
  golden-rings: 5
  partridges: 
    count: 1
    location: "a pear tree"
  turtle-doves: two
@endyaml

doea deer, a female deerraya drop of golden sunpi3.14159xmastruefrench-hens3calling-birds   xmas-fifth-day   hueydeweylouiefredcalling-birdsfourfrench-hens3golden-rings5partridges   turtle-dovestwocount1locationa pear tree

12-04-01-1 Without-style

@startyaml
  -
    name: Mark McGwire
    hr:   65
    avg:  0.278
  -
    name: Sammy Sosa
    hr:   63
    avg:  0.288
@endyaml

      nameMark McGwirehr65avg0.278nameSammy Sosahr63avg0.288

12-04-02-1 With-style

@startyaml
<style>
yamlDiagram {
  node {
    BackGroundColor lightblue
    LineColor lightblue
    FontName Helvetica
    FontColor red
    FontSize 18
    FontStyle bold
    BackGroundColor Khaki
    RoundCorner 0
    LineThickness 2
    LineStyle 10;5
    separator {
      LineThickness 0.5
      LineColor black
      LineStyle 1;5
    }
  }
  arrow {
    BackGroundColor lightblue
    LineColor green
    LineThickness 2
    LineStyle 2;5
  }
}
</style>
  -
    name: Mark McGwire
    hr:   65
    avg:  0.278
  -
    name: Sammy Sosa
    hr:   63
    avg:  0.288
@endyaml

      nameMark McGwirehr65avg0.278nameSammy Sosahr63avg0.288

12-1 Display-YAML-Data

@startyaml
fruit: Apple
size: Large
color: Red
@endyaml
fruitApplesizeLargecolorRed

13-01-1 Simple-diagram

@startuml
nwdiag {
network dmz {
address = "210.x.x.x/24"

web01 [address = "210.x.x.1"];
web02 [address = "210.x.x.2"];
  }
  network internal {
  address = "172.x.x.x/24";

  web01 [address = "172.x.x.1"];
  web02 [address = "172.x.x.2"];
  db01;
  db02;
}
}
@enduml

dmz210.x.x.x/24internal172.x.x.x/24210.x.x.1172.x.x.1210.x.x.2172.x.x.2web01web02db01db02

13-02-1 Define-multiple-addresses

@startuml
nwdiag {
network dmz {
address = "210.x.x.x/24"

// set multiple addresses (using comma)
web01 [address = "210.x.x.1, 210.x.x.20"];
web02 [address = "210.x.x.2"];
  }
  network internal {
  address = "172.x.x.x/24";

  web01 [address = "172.x.x.1"];
  web02 [address = "172.x.x.2"];
  db01;
  db02;
}
}
@enduml

dmz210.x.x.x/24internal172.x.x.x/24210.x.x.1210.x.x.20172.x.x.1210.x.x.2172.x.x.2web01web02db01db02

13-03-01-1 Define-group-inside-network-definitions

@startuml
nwdiag {
network Sample_front {
address = "192.168.10.0/24";

// define group
group web {
  web01 [address = ".1"];
  web02 [address = ".2"];
}
  }
  network Sample_back {
  address = "192.168.20.0/24";
  web01 [address = ".1"];
  web02 [address = ".2"];
  db01 [address = ".101"];
  db02 [address = ".102"];

  // define network using defined nodes
  group db {
    db01;
    db02;
  }
}
}
@enduml

Sample_front192.168.10.0/24Sample_back192.168.20.0/24.1.1.2.2.101.102web01web02db01db02

13-03-02-1 Define-group-outside-of-network-definitions

@startuml
nwdiag {
// define group outside of network definitions
group {
  color = "#FFAAAA";

  web01;
  web02;
  db01;
}

network dmz {
web01;
web02;
  }
  network internal {
  web01;
  web02;
  db01;
  db02;
}
}
@enduml

dmzinternalweb01web02db02db01

13-03-04-1 Example-with-2-group

@startuml
nwdiag {
group {
  color = "#FFaaaa";
  web01;
  db01;
}
group {
  color = "#aaaaFF";
  web02;
  db02;
}
network dmz {
address = "210.x.x.x/24"

web01 [address = "210.x.x.1"];
web02 [address = "210.x.x.2"];
  }
  network internal {
  address = "172.x.x.x/24";

  web01 [address = "172.x.x.1"];
  web02 [address = "172.x.x.2"];
  db01 ;
  db02 ;
}
}
@enduml

dmz210.x.x.x/24internal172.x.x.x/24210.x.x.1172.x.x.1210.x.x.2172.x.x.2web01web02db01db02

13-03-05-1 Example-with-3-group

@startuml
nwdiag {
group {
  color = "#FFaaaa";
  web01;
  db01;
}
group {
  color = "#aaFFaa";
  web02;
  db02;
}
group {
  color = "#aaaaFF";
  web03;
  db03;
}

network dmz {
web01;
web02;
web03;
  }
  network internal {
  web01;
  db01 ;
  web02;
  db02 ;
  web03;
  db03;
}
}
@enduml

dmzinternalweb01web02web03db01db02db03

13-04-01-1 Extended-Syntax-Network

@startuml
nwdiag {
network Sample_front {
address = "192.168.10.0/24"
color = "red"

// define group
group web {
  web01 [address = ".1, .2", shape = "node"]
  web02 [address = ".2, .3"]
}
  }
  network Sample_back {
  address = "192.168.20.0/24"
  color = "palegreen"
  web01 [address = ".1"]
  web02 [address = ".2"]
  db01 [address = ".101", shape = database ]
  db02 [address = ".102"]

  // define network using defined nodes
  group db {
    db01;
    db02;
  }
}
}
@enduml

Sample_front192.168.10.0/24Sample_back192.168.20.0/24.1.2.1.2.3.2.101.102web01web02db01db02

13-04-02-1 Extended-Syntax-Group

@startuml
nwdiag {
group {
  color = "#CCFFCC";
  description = "Long group description";

  web01;
  web02;
  db01;
}

network dmz {
web01;
web02;
  }
  network internal {
  web01;
  web02;
  db01 [address = ".101", shape = database];
}
}
@enduml

dmzinternalLong group description.101web01web02db01

13-05-1 Using-Sprites

@startuml
!include <office/Servers/application_server>
!include <office/Servers/database_server>

nwdiag {
network dmz {
address = "210.x.x.x/24"

// set multiple addresses (using comma)
web01 [address = "210.x.x.1, 210.x.x.20",  description = "<$application_server>\n web01"]
web02 [address = "210.x.x.2",  description = "<$application_server>\n web02"];
  }
  network internal {
  address = "172.x.x.x/24";

  web01 [address = "172.x.x.1"];
  web02 [address = "172.x.x.2"];
  db01 [address = "172.x.x.100",  description = "<$database_server>\n db01"];
  db02 [address = "172.x.x.101",  description = "<$database_server>\n db02"];
}
}
@enduml

dmz210.x.x.x/24internal172.x.x.x/24210.x.x.1210.x.x.20172.x.x.1210.x.x.2172.x.x.2172.x.x.100172.x.x.101web01web02db01db02

13-06-1 Using-OpenIconic

@startuml

nwdiag {
group nightly {
  color = "#FFAAAA";
  description = "<&clock> Restarted nightly <&clock>";
  web02;
  db01;
}
network dmz {
address = "210.x.x.x/24"

user [description = "<&person*4.5>\n user1"];
// set multiple addresses (using comma)
web01 [address = "210.x.x.1, 210.x.x.20",  description = "<&cog*4>\nweb01"]
web02 [address = "210.x.x.2",  description = "<&cog*4>\nweb02"];

  }
  network internal {
  address = "172.x.x.x/24";

  web01 [address = "172.x.x.1"];
  web02 [address = "172.x.x.2"];
  db01 [address = "172.x.x.100",  description = "<&spreadsheet*4>\n db01"];
  db02 [address = "172.x.x.101",  description = "<&spreadsheet*4>\n db02"];
  ptr  [address = "172.x.x.110",  description = "<&print*4>\n ptr01"];
}
}
@enduml

dmz210.x.x.x/24internal172.x.x.x/24Restarted nightly210.x.x.1210.x.x.20172.x.x.1210.x.x.2172.x.x.2172.x.x.101172.x.x.110172.x.x.100user1web01web02db02ptr01db01

13-07-1 Same-nodes-on-more-than-two-networks

@startuml
nwdiag {
// define group at outside network definitions
group {
  color = "#7777FF";

  web01;
  web02;
  db01;
}

network dmz {
color = "pink"

web01;
web02;
  }

  network internal {
  web01;
  web02;
  db01 [shape = database ];
}

network internal2 {
color = "LightBlue";

web01;
web02;
db01;
  }

}
@enduml

dmzinternalinternal2web01web02db01

13-08-1 Peer-networks

@startuml
nwdiag {
inet [shape = cloud];
inet -- router;

network {
router;
web01;
web02;
  }
}
@enduml

  inetrouterweb01web02

13-09-01-1 Without-group

@startuml
nwdiag {
internet [ shape = cloud];
internet -- router;

network proxy {
router;
app;
    }
    network default {
    app;
    db;
  }
}
@enduml

  proxydefaultinternetrouterappdb

13-09-02-1 Group-on-first

@startuml
nwdiag {
internet [ shape = cloud];
internet -- router;

group {
  color = "pink";
  app;
  db;
}

network proxy {
router;
app;
  }

  network default {
  app;
  db;
}
}
@enduml

  proxydefaultinternetrouterappdb

13-09-03-1 Group-on-second

@startuml
nwdiag {
internet [ shape = cloud];
internet -- router;

network proxy {
router;
app;
  }

  group {
    color = "pink";
    app;
    db;
  }

  network default {
  app;
  db;
}
}
@enduml

  proxydefaultinternetrouterappdb

13-09-04-1 Group-on-third

@startuml
nwdiag {
internet [ shape = cloud];
internet -- router;

network proxy {
router;
app;
  }
  network default {
  app;
  db;
}
group {
  color = "pink";
  app;
  db;
}
}
@enduml

  proxydefaultinternetrouterappdb

13-10-1 Add-title-caption-header-footer-or-legend-on-network-diagram

@startuml

header some header

footer some footer

title My title

nwdiag {
network inet {
web01 [shape = cloud]
  }
}

legend
  The legend
end legend

caption This is caption
@enduml

some headerMy titleinetweb01The legendThis is captionsome footer

13-11-1 Change-width-of-the-networks

@startuml
nwdiag {
network NETWORK_BASE {
dev_A [address = "dev_A" ]
dev_B [address = "dev_B" ]
  }
  network IntNET1 {
  dev_B [address = "dev_B1" ]
  dev_M [address = "dev_M1" ]
}
network IntNET2 {
dev_B [address = "dev_B2" ]
dev_M [address = "dev_M2" ]
 }
}
@enduml

NETWORK_BASEIntNET1IntNET2dev_Adev_Bdev_B1dev_B2dev_M1dev_M2dev_Adev_Bdev_M

13-11-2 Change-width-of-the-networks

@startuml
nwdiag {
network NETWORK_BASE {
width = full
dev_A   [address = "dev_A" ]
dev_B [address = "dev_B" ]
  }
  network IntNET1 {
  width = full
  dev_B [address = "dev_B1" ]
  dev_M [address = "dev_M1" ]
}
network IntNET2 {
width = full
dev_B [address = "dev_B2" ]
dev_M [address = "dev_M2" ]
 }
}
@enduml

NETWORK_BASEIntNET1IntNET2dev_Adev_Bdev_B1dev_B2dev_M1dev_M2dev_Adev_Bdev_M

13-11-3 Change-width-of-the-networks

@startuml
nwdiag {
network NETWORK_BASE {
width = full
dev_A   [address = "dev_A" ]
dev_B [address = "dev_B" ]
  }
  network IntNET1 {
  width = full
  dev_B [address = "dev_B1" ]
  dev_M [address = "dev_M1" ]
}
network IntNET2 {
dev_B [address = "dev_B2" ]
dev_M [address = "dev_M2" ]
 }
}
@enduml

NETWORK_BASEIntNET1IntNET2dev_Adev_Bdev_B1dev_B2dev_M1dev_M2dev_Adev_Bdev_M

13-12-1 Other-internal-networks

@startuml
nwdiag {
network LAN1 {
a [address = "a1"];
  }
  network LAN2 {
  a [address = "a2"];
  switch;
}
switch -- equip;
equip -- printer;
}
@enduml

LAN1LAN2  a1a2aswitchequipprinter

13-12-2 Other-internal-networks

@startuml
nwdiag {
network LAN1 {
a [address = "a1"];
  }
  network LAN2 {
  a [address = "a2"];
  switch [address = "s2"];
}
switch -- equip;
equip [address = "e3"];
equip -- printer;
printer [address = "USB"];
}
@enduml

LAN1LAN2  a1a2s2e3USBaswitchequipprinter

14-01-1 Basic-widgets

@startsalt
{
  Just plain text
  [This is my button]
  ()  Unchecked radio
  (X) Checked radio
  []  Unchecked box
  [X] Checked box
  "Enter text here   "
  ^This is a droplist^
}
@endsalt

Just plain textThis is my buttonUnchecked radioChecked radioUnchecked boxChecked boxEnter text hereThis is a droplist

14-02-1 Using-grid

@startsalt
{
  Login    | "MyName   "
  Password | "****     "
  [Cancel] | [  OK   ]
}
@endsalt

LoginMyNamePassword****CancelOK

14-02-2 Using-grid

@startsalt
{+
  Login    | "MyName   "
  Password | "****     "
  [Cancel] | [  OK   ]
}
@endsalt

LoginMyNamePassword****CancelOK

14-03-1 Group-box

@startsalt
{^"My group box"
  Login    | "MyName   "
  Password | "****     "
  [Cancel] | [  OK   ]
}
@endsalt

LoginMyNamePassword****CancelOKMy group box

14-04-1 Using-separator

@startsalt
{
  Text1
  ..
  "Some field"
  ==
  Note on usage
  ~~
  Another text
  --
  [Ok]
}
@endsalt

Text1Some fieldNote on usageAnother textOk

14-05-1 Tree-widget

@startsalt
{
{T
 + World
 ++ America
 +++ Canada
 +++ USA
 ++++ New York
 ++++ Boston
 +++ Mexico
 ++ Europe
 +++ Italy
 +++ Germany
 ++++ Berlin
 ++ Africa
}
}
@endsalt

WorldAmericaCanadaUSANew YorkBostonMexicoEuropeItalyGermanyBerlinAfrica

14-06-1 Tree-table

@startsalt
{
{T
+Region        | Population    | Age
+ World        | 7.13 billion  | 30
++ America     | 964 million   | 30
+++ Canada     | 35 million    | 30
+++ USA        | 319 million   | 30
++++ NYC       | 8 million     | 30
++++ Boston    | 617 thousand  | 30
+++ Mexico     | 117 million   | 30
++ Europe      | 601 million   | 30
+++ Italy      | 61 million    | 30
+++ Germany    | 82 million    | 30
++++ Berlin    | 3 million     | 30
++ Africa      | 1 billion     | 30
}
}
@endsalt

RegionPopulationAgeWorld7.13 billion30America964 million30Canada35 million30USA319 million30NYC8 million30Boston617 thousand30Mexico117 million30Europe601 million30Italy61 million30Germany82 million30Berlin3 million30Africa1 billion30

14-06-2 Tree-table

@startsalt
{
..
== with T!
{T!
+Region        | Population    | Age
+ World        | 7.13 billion  | 30
++ America     | 964 million   | 30
}
..
== with T-
{T-
+Region        | Population    | Age
+ World        | 7.13 billion  | 30
++ America     | 964 million   | 30
}
..
== with T+
{T+
+Region        | Population    | Age
+ World        | 7.13 billion  | 30
++ America     | 964 million   | 30
}
..
== with T#
{T#
+Region        | Population    | Age
+ World        | 7.13 billion  | 30
++ America     | 964 million   | 30
}
..
}
@endsalt

with T!RegionPopulationAgeWorld7.13 billion30America964 million30with T-RegionPopulationAgeWorld7.13 billion30America964 million30with T+RegionPopulationAgeWorld7.13 billion30America964 million30with T#RegionPopulationAgeWorld7.13 billion30America964 million30

14-07-1 Enclosing-brackets

@startsalt
{
Name         | "                 "
Modifiers:   | { (X) public | () default | () private | () protected
                [] abstract | [] final   | [] static }
Superclass:  | { "java.lang.Object " | [Browse...] }
}
@endsalt

Name Modifiers:publicdefaultprivateprotectedabstractfinalstaticSuperclass:java.lang.ObjectBrowse...

14-08-1 Adding-tabs

@startsalt
{+
{/ <b>General | Fullscreen | Behavior | Saving }
{
{ Open image in: | ^Smart Mode^ }
[X] Smooth images when zoomed
[X] Confirm image deletion
[ ] Show hidden images
}
[Close]
}
@endsalt

GeneralFullscreenBehaviorSavingOpen image in:Smart ModeSmooth images when zoomedConfirm image deletionShow hidden imagesClose

14-08-2 Adding-tabs

@startsalt
{+
{/ <b>General
Fullscreen
Behavior
Saving } |
{
{ Open image in: | ^Smart Mode^ }
[X] Smooth images when zoomed
[X] Confirm image deletion
[ ] Show hidden images
[Close]
}
}
@endsalt

GeneralFullscreenBehaviorSavingOpen image in:Smart ModeSmooth images when zoomedConfirm image deletionShow hidden imagesClose

14-09-1 Using-menu

@startsalt
{+
{* File | Edit | Source | Refactor }
{/ General | Fullscreen | Behavior | Saving }
{
{ Open image in: | ^Smart Mode^ }
[X] Smooth images when zoomed
[X] Confirm image deletion
[ ] Show hidden images
}
[Close]
}
@endsalt

FileEditSourceRefactorGeneralFullscreenBehaviorSavingOpen image in:Smart ModeSmooth images when zoomedConfirm image deletionShow hidden imagesClose

14-09-2 Using-menu

@startsalt
{+
{* File | Edit | Source | Refactor
 Refactor | New | Open File | - | Close | Close All }
{/ General | Fullscreen | Behavior | Saving }
{
{ Open image in: | ^Smart Mode^ }
[X] Smooth images when zoomed
[X] Confirm image deletion
[ ] Show hidden images
}
[Close]
}
@endsalt

FileEditSourceRefactorGeneralFullscreenBehaviorSavingOpen image in:Smart ModeSmooth images when zoomedConfirm image deletionShow hidden imagesCloseNewOpen FileCloseClose All

14-09-3 Using-menu

@startsalt
{+
{* File | Edit | Source | Refactor }
{/ General | Fullscreen | Behavior | Saving }
{
{ Open image in: | ^Smart Mode^^Normal Mode^ }
[X] Smooth images when zoomed
[X] Confirm image deletion
[ ] Show hidden images
}
[Close]
}
@endsalt

FileEditSourceRefactorGeneralFullscreenBehaviorSavingOpen image in:Smart ModeNormal ModeSmooth images when zoomedConfirm image deletionShow hidden imagesCloseNormal Mode

14-10-1 Advanced-table

@startsalt
{#
. | Column 2 | Column 3
Row header 1 | value 1 | value 2
Row header 2 | A long cell | *
}
@endsalt

Column 2Column 3Row header 1value 1value 2Row header 2A long cell

14-11-1 Scroll-Bars

@startsalt
{S
Message
.
.
.
.
}
@endsalt

Message

14-11-2 Scroll-Bars

@startsalt
{SI
Message
.
.
.
.
}
@endsalt

Message

14-11-3 Scroll-Bars

@startsalt
{S-
Message
.
.
.
.
}
@endsalt

Message

14-12-1 Coloros

@startsalt
{
  <color:Blue>Just plain text
  [This is my default button]
  [<color:green>This is my green button]
  [<color:#9a9a9a>This is my disabled button]
  []  <color:red>Unchecked box
  [X] <color:green>Checked box
  "Enter text here   "
  ^This is a droplist^
  ^<color:#9a9a9a>This is a disabled droplist^
  ^<color:red>This is a red droplist^
}
@endsalt

Just plain textThis is my default buttonThis is my green buttonThis is my disabled buttonUnchecked boxChecked boxEnter text hereThis is a droplistThis is a disabled droplistThis is a red droplist

14-13-1 Pseudo-sprite

@startsalt
 {
 [X] checkbox|[] checkbox
 () radio | (X) radio
 This is a text|[This is my button]|This is another text
 "A field"|"Another long Field"|[A button]
 <<folder
 ............
 .XXXXX......
 .X...X......
 .XXXXXXXXXX.
 .X........X.
 .X........X.
 .X........X.
 .X........X.
 .XXXXXXXXXX.
 ............
 >>|<color:blue>other folder|<<folder>>
^Droplist^
}
@endsalt

checkboxcheckboxradioradioThis is a textThis is my buttonThis is another textA fieldAnother long FieldA buttonother folderDroplist

14-14-1 OpenIconic

@startsalt
{
  Login<&person> | "MyName   "
  Password<&key> | "****     "
  [Cancel <&circle-x>] | [OK <&account-login>]
}
@endsalt

LoginMyNamePassword****CancelOK

14-14-2 OpenIconic

@startuml
listopeniconic
@enduml

List Open IconicCredit tohttps://useiconic.com/open account-loginaccount-logoutaction-redoaction-undoalign-centeralign-leftalign-rightaperturearrow-bottomarrow-circle-bottomarrow-circle-leftarrow-circle-rightarrow-circle-toparrow-leftarrow-rightarrow-thick-bottomarrow-thick-leftarrow-thick-rightarrow-thick-toparrow-topaudio-spectrumaudiobadgebanbar-chartbasketbattery-emptybattery-fullbeakerbellbluetoothboldboltbookbookmarkboxbriefcasebritish-poundbrowserbrushbugbullhorncalculatorcalendarcamera-slrcaret-bottomcaret-leftcaret-rightcaret-topcartchatcheckchevron-bottomchevron-leftchevron-rightchevron-topcircle-checkcircle-xclipboardclockcloud-downloadcloud-uploadcloudcloudycodecogcollapse-downcollapse-leftcollapse-rightcollapse-upcommandcomment-squarecompasscontrastcopywritingcredit-cardcropdashboarddata-transfer-downloaddata-transfer-uploaddeletedialdocumentdollardouble-quote-sans-leftdouble-quote-sans-rightdouble-quote-serif-leftdouble-quote-serif-rightdropletejectelevatorellipsesenvelope-closedenvelope-openeuroexcerptexpand-downexpand-leftexpand-rightexpand-upexternal-linkeyeeyedropperfilefireflagflashfolderforkfullscreen-enterfullscreen-exitglobegraphgrid-four-upgrid-three-upgrid-two-uphard-driveheaderheadphoneshearthomeimageinboxinfinityinfoitalicjustify-centerjustify-leftjustify-rightkeylaptoplayerslightbulblink-brokenlink-intactlist-richlistlocationlock-lockedlock-unlockedloop-circularloop-squareloopmagnifying-glassmap-markermapmedia-pausemedia-playmedia-recordmedia-skip-backwardmedia-skip-forwardmedia-step-backwardmedia-step-forwardmedia-stopmedical-crossmenumicrophoneminusmonitormoonmovemusical-notepaperclippencilpeoplepersonphonepie-chartpinplay-circlepluspower-standbyprintprojectpulsepuzzle-piecequestion-markrainrandomreloadresize-bothresize-heightresize-widthrss-altrssscriptshare-boxedshareshieldsignalsignpostsort-ascendingsort-descendingspreadsheetstarsuntablettagtagstargettaskterminaltextthumb-downthumb-uptimertransfertrashunderlinevertical-align-bottomvertical-align-centervertical-align-topvideovolume-highvolume-lowvolume-offwarningwifiwrenchxyenzoom-inzoom-out

14-15-1 Include-Salt-on-activity-diagram

@startuml
(*) --> "
{{
salt
{+
<b>an example
choose one option
()one
()two
[ok]
}
}}
" as choose

choose -right-> "
{{
salt
{+
<b>please wait
operation in progress
<&clock>
[cancel]
}
}}
" as wait
wait -right-> "
{{
salt
{+
<b>success
congratulations!
[ok]
}
}}
" as success

wait -down-> "
{{
salt
{+
<b>error
failed, sorry
[ok]
}
}}
"
@enduml

14-15-2 Include-Salt-on-activity-diagram

@startuml
!unquoted procedure SALT($x)
"{{
salt
%invoke_procedure("_"+$x)
}}" as $x
!endprocedure

!procedure _choose()
{+
<b>an example
choose one option
()one
()two
[ok]
}
!endprocedure

!procedure _wait()
{+
<b>please wait
operation in progress
<&clock>
[cancel]
}
!endprocedure

!procedure _success()
{+
<b>success
congratulations!
[ok]
}
!endprocedure

!procedure _error()
{+
<b>error
failed, sorry
[ok]
}
!endprocedure

(*) --> SALT(choose)
-right-> SALT(wait)
wait -right-> SALT(success)
wait -down-> SALT(error)
@enduml

14-16-1 Include-salt-on-while-condition-of-activity-diagram

@startuml
start
while (\n{{\nsalt\n{+\nPassword | "****     "\n[Cancel] | [  OK   ]}\n}}\n) is (Incorrect)
  :log attempt;
  :attempt_count++;
  if (attempt_count > 4) then (yes)
    :increase delay timer;
    :wait for timer to expire;
  else (no)
  endif
endwhile (correct)
:log request;
:disable service;
@enduml

log attemptattempt_count++increase delay timerwait for timer to expireyesattempt_count > 4noIncorrect  correctlog requestdisable service

15-01-1 Archimate-keyword

@startuml
archimate #Technology "VPN Server" as vpnServerA <<technology-device>>

rectangle GO #lightgreen
rectangle STOP #red
rectangle WAIT #orange
@enduml

VPN ServerGOSTOPWAIT

15-02-1 Defining-Junctions

@startuml
!define Junction_Or circle #black
!define Junction_And circle #whitesmoke

Junction_And JunctionAnd
Junction_Or JunctionOr

archimate #Technology "VPN Server" as vpnServerA <<technology-device>>

rectangle GO #lightgreen
rectangle STOP #red
rectangle WAIT #orange
GO -up-> JunctionOr
STOP -up-> JunctionOr
STOP -down-> JunctionAnd
WAIT -down-> JunctionAnd
@enduml

JunctionAndJunctionOrVPN ServerGOSTOPWAIT

15-03-1 Example-1

@startuml
skinparam rectangle<<behavior>> {
  roundCorner 25
}
sprite $bProcess jar:archimate/business-process
sprite $aService jar:archimate/application-service
sprite $aComponent jar:archimate/application-component

rectangle "Handle claim"  as HC <<$bProcess>><<behavior>> #Business
rectangle "Capture Information"  as CI <<$bProcess>><<behavior>> #Business
rectangle "Notify\nAdditional Stakeholders" as NAS <<$bProcess>><<behavior>> #Business
rectangle "Validate" as V <<$bProcess>><<behavior>> #Business
rectangle "Investigate" as I <<$bProcess>><<behavior>> #Business
rectangle "Pay" as P <<$bProcess>><<behavior>> #Business

HC *-down- CI
HC *-down- NAS
HC *-down- V
HC *-down- I
HC *-down- P

CI -right->> NAS
NAS -right->> V
V -right->> I
I -right->> P

rectangle "Scanning" as scanning <<$aService>><<behavior>> #Application
rectangle "Customer admnistration" as customerAdministration <<$aService>><<behavior>> #Application
rectangle "Claims admnistration" as claimsAdministration <<$aService>><<behavior>> #Application
rectangle Printing <<$aService>><<behavior>> #Application
rectangle Payment <<$aService>><<behavior>> #Application

scanning -up-> CI
customerAdministration  -up-> CI
claimsAdministration -up-> NAS
claimsAdministration -up-> V
claimsAdministration -up-> I
Payment -up-> P

Printing -up-> V
Printing -up-> P

rectangle "Document\nManagement\nSystem" as DMS <<$aComponent>> #Application
rectangle "General\nCRM\nSystem" as CRM <<$aComponent>>  #Application
rectangle "Home & Away\nPolicy\nAdministration" as HAPA <<$aComponent>> #Application
rectangle "Home & Away\nFinancial\nAdministration" as HFPA <<$aComponent>>  #Application

DMS .up.|> scanning
DMS .up.|> Printing
CRM .up.|> customerAdministration
HAPA .up.|> claimsAdministration
HFPA .up.|> Payment

legend left
  Example from the "Archisurance case study" (OpenGroup).
  See
  ====
  <$bProcess> :business process
  ====
  <$aService> : application service
  ====
  <$aComponent> : application component
endlegend
@enduml

Handle claimCapture InformationNotifyAdditional StakeholdersValidateInvestigatePayScanningCustomer admnistrationClaims admnistrationPrintingPaymentDocumentManagementSystemGeneralCRMSystemHome & AwayPolicyAdministrationHome & AwayFinancialAdministrationExample from the "Archisurance case study" (OpenGroup).See:business process: application service: application component

15-04-1 Example-2

@startuml
skinparam roundcorner 25
rectangle "Capture Information"  as CI <<$archimate/business-process>> #Business
@enduml

Capture Information

15-05-1 List-possible-sprites

@startuml
listsprite
@enduml

List Current SpritesCredit tohttp://www.archimatetool.com archimate: accessactivityactoraggregationapplication-collaborationapplication-componentapplication-data-objectapplication-eventapplication-functionapplication-interactionapplication-interfaceapplication-processapplication-serviceassessment-filledassessmentassignmentassociation-unidirectassociationbusiness-activitybusiness-actorbusiness-collaborationbusiness-contractbusiness-eventbusiness-functionbusiness-interactionbusiness-interfacebusiness-locationbusiness-meaningbusiness-objectbusiness-processbusiness-productbusiness-representationbusiness-rolebusiness-servicebusiness-valuecollaborationcommunication-pathcomponentcompositionconstraint-filledconstraintcontractdeliverable-filleddeliverabledevicedriver-filleddrivereventflowfunctiongap-filledgapgoal-filledgoalimplementation-deliverableimplementation-eventimplementation-gapimplementation-plateauimplementation-workpackageinfluenceinteractioninterface-requiredinterface-symmetricinterfacejunction-andjunction-orjunctionlocationmeaningmotivation-assessmentmotivation-constraintmotivation-drivermotivation-goalmotivation-meaningmotivation-outcomemotivation-principlemotivation-requirementmotivation-stakeholdermotivation-valuenetworknodeobjectphysical-distribution-networkphysical-equipmentphysical-facilityphysical-materialplateauprinciple-filledprincipleprocessproductrealisationrepresentationrequirement-filledrequirementroleserviceservingspecialisationspecializationstakeholder-filledstrategy-capabilitystrategy-course-of-actionstrategy-resourcestrategy-value-streamsystem-softwaretechnology-artifacttechnology-collaborationtechnology-communication-networktechnology-communication-pathtechnology-devicetechnology-eventtechnology-functiontechnology-infra-interfacetechnology-infra-servicetechnology-interactiontechnology-interfacetechnology-networktechnology-nodetechnology-pathtechnology-processtechnology-servicetechnology-system-softwaretriggeringused-byvalueworkpackage-filled

15-06-02-1 Archimate-elements

@startuml
!include <archimate/Archimate>
Motivation_Stakeholder(StakeholderElement, "Stakeholder Description")
@enduml

Stakeholder Description

15-06-02-2 Archimate-elements

@startuml
!include <archimate/Archimate>
Business_Service(BService, "Business Service")
@enduml

Business Service

15-06-03-1 Archimate-relationships

@startuml
!include <archimate/Archimate>
Motivation_Stakeholder(StakeholderElement, "Stakeholder Description")
Business_Service(BService, "Business Service")
Rel_Composition(StakeholderElement, BService, "Description for the relationship")
@enduml

Stakeholder DescriptionBusiness ServiceDescription for therelationship

15-06-03-2 Archimate-relationships

@startuml
!include <archimate/Archimate>
Motivation_Stakeholder(StakeholderElement, "Stakeholder Description")
Business_Service(BService, "Business Service")
Rel_Composition_Down(StakeholderElement, BService, "Description for the relationship")
@enduml

Stakeholder DescriptionBusiness ServiceDescription for therelationship

15-06-04-1 Appendice-Examples-of-all-Archimate-RelationTypes

@startuml
left to right direction
skinparam nodesep 4
!include <archimate/Archimate>
Rel_Triggering(i15, j15, Triggering)
Rel_Specialization(i14, j14, Specialization)
Rel_Serving(i13, j13, Serving)
Rel_Realization(i12, j12, Realization)
Rel_Influence(i11, j11, Influence)
Rel_Flow(i10, j10, Flow)
Rel_Composition(i9, j9, Composition)
Rel_Association_dir(i8, j8, Association_dir)
Rel_Association(i7, j7, Association)
Rel_Assignment(i6, j6, Assignment)
Rel_Aggregation(i5, j5, Aggregation)
Rel_Access_w(i4, j4, Access_w)
Rel_Access_rw(i3, j3, Access_rw)
Rel_Access_r(i2, j2, Access_r)
Rel_Access(i1, j1, Access)
@enduml

i15j15i14j14i13j13i12j12i11j11i10j10i9j9i8j8i7j7i6j6i5j5i4j4i3j3i2j2i1j1TriggeringSpecializationServingRealizationInfluenceFlowCompositionAssociation_dirAssociationAssignmentAggregationAccess_wAccess_rwAccess_rAccess

16-01-01-1 Declaring-tasks-Duration

@startgantt
[Prototype design] lasts 15 days
[Test prototype] lasts 10 days
@endgantt
123456789101112131415Prototype designTest prototype123456789101112131415

16-01-02-1 Declaring-tasks-Start

@startgantt
[Prototype design] lasts 15 days
[Test prototype] lasts 10 days
Project starts 2020-07-01
[Prototype design] starts 2020-07-01
[Test prototype] starts 2020-07-16
@endgantt
WeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSa12345678910111213141516171819202122232425July 2020Prototype designTest prototypeWeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSa12345678910111213141516171819202122232425July 2020

16-01-03-1 Declaring-tasks-End

@startgantt
[Prototype design] lasts 15 days
[Test prototype] lasts 10 days
Project starts 2020-07-01
[Prototype design] ends 2020-07-15
[Test prototype] ends 2020-07-25
@endgantt
WeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSa12345678910111213141516171819202122232425July 2020Prototype designTest prototypeWeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSa12345678910111213141516171819202122232425July 2020

16-01-04-1 StartEnd

@startgantt
Project starts 2020-07-01
[Prototype design] starts 2020-07-01
[Test prototype] starts 2020-07-16
[Prototype design] ends 2020-07-15
[Test prototype] ends 2020-07-25
@endgantt
WeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSa12345678910111213141516171819202122232425July 2020Prototype designTest prototypeWeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSa12345678910111213141516171819202122232425July 2020

16-02-1 One-line-declaration

@startgantt
Project starts 2020-07-01
[Prototype design] starts 2020-07-01 and ends 2020-07-15
[Test prototype] starts 2020-07-16 and lasts 10 days
@enduml
WeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSa12345678910111213141516171819202122232425July 2020Prototype designTest prototypeWeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSa12345678910111213141516171819202122232425July 2020

16-03-1 Adding-constraints

@startgantt
[Prototype design] lasts 15 days
[Test prototype] lasts 10 days
[Test prototype] starts at [Prototype design]'s end
@endgantt
12345678910111213141516171819202122232425Prototype designTest prototype12345678910111213141516171819202122232425

16-03-2 Adding-constraints

@startgantt
[Prototype design] lasts 10 days
[Code prototype] lasts 10 days
[Write tests] lasts 5 days
[Code prototype] starts at [Prototype design]'s end
[Write tests] starts at [Code prototype]'s start
@endgantt
1234567891011121314151617181920Prototype designCode prototypeWrite tests1234567891011121314151617181920

16-04-1 Short-names

@startgantt
[Prototype design] as [D] lasts 15 days
[Test prototype] as [T] lasts 10 days
[T] starts at [D]'s end
@endgantt
12345678910111213141516171819202122232425Prototype designTest prototype12345678910111213141516171819202122232425

16-05-1 Customize-colors

@startgantt
[Prototype design] lasts 13 days
[Test prototype] lasts 4 days
[Test prototype] starts at [Prototype design]'s end
[Prototype design] is colored in Fuchsia/FireBrick
[Test prototype] is colored in GreenYellow/Green
@endgantt
1234567891011121314151617Prototype designTest prototype1234567891011121314151617

16-06-1 Completion-status

@startgantt
[foo] lasts 21 days
[foo] is 40% completed
[bar] lasts 30 days and is 10% complete
@endgantt
123456789101112131415161718192021222324252627282930foobar123456789101112131415161718192021222324252627282930

16-07-01-1 Milestone-Relative-milestone

@startgantt
[Test prototype] lasts 10 days
[Prototype completed] happens at [Test prototype]'s end
[Setup assembly line] lasts 12 days
[Setup assembly line] starts at [Test prototype]'s end
@endgantt
12345678910111213141516171819202122Test prototypePrototype completedSetup assembly line12345678910111213141516171819202122

16-07-02-1 Milestone-Absolute-milestone

@startgantt
Project starts 2020-07-01
[Test prototype] lasts 10 days
[Prototype completed] happens 2020-07-10
[Setup assembly line] lasts 12 days
[Setup assembly line] starts at [Test prototype]'s end
@endgantt
WeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSaSuMoTuWe12345678910111213141516171819202122July 2020Test prototypePrototype completedSetup assembly lineWeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSaSuMoTuWe12345678910111213141516171819202122July 2020

16-07-03-1 Milestone-of-maximum-end-of-tasks

@startgantt
[Task1] lasts 4 days
then [Task1.1] lasts 4 days
[Task1.2] starts at [Task1]'s end and lasts 7 days
[Task2] lasts 5 days
then [Task2.1] lasts 4 days
[MaxTaskEnd] happens at [Task1.1]'s end
[MaxTaskEnd] happens at [Task1.2]'s end
[MaxTaskEnd] happens at [Task2.1]'s end
@endgantt
1234567891011Task1Task1.1Task1.2Task2Task2.1MaxTaskEnd1234567891011

16-08-1 Hyperlinks

@startgantt
[task1] lasts 10 days
[task1] links to [[http://plantuml.com]]
@endgantt
12345678910task112345678910

16-09-1 Calendar

@startgantt
Project starts the 20th of september 2017
[Prototype design] as [TASK1] lasts 13 days
[TASK1] is colored in Lavender/LightBlue
@endgantt
WeThFrSaSuMoTuWeThFrSaSuMo202122232425262728293012September 2017OctPrototype designWeThFrSaSuMoTuWeThFrSaSuMo202122232425262728293012September 2017Oct

16-10-1 Coloring-days

@startgantt
Project starts the 2020/09/01
2020/09/07 is colored in salmon
2020/09/13 to 2020/09/16 are colored in lightblue
[Prototype design] as [TASK1] lasts 22 days
[TASK1] is colored in Lavender/LightBlue
[Prototype completed] happens at [TASK1]'s end
@endgantt
TuWeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSaSuMoTu12345678910111213141516171819202122September 2020Prototype designPrototype completedTuWeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSaSuMoTu12345678910111213141516171819202122September 2020

16-11-01-1 Changing-scale-Daily

@startgantt
saturday are closed
sunday are closed
Project starts the 1st of january 2021
[Prototype design end] as [TASK1] lasts 19 days
[TASK1] is colored in Lavender/LightBlue
[Testing] lasts 14 days
[TASK1]->[Testing]
2021-01-18 to 2021-01-22 are named [End's committee]
2021-01-18 to 2021-01-22 are colored in salmon
@endgantt
FrSaSuMoTuWeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSaSuMoTu1234567891011121314151617181920212223242526272829303112345678910111213141516January 2021February 2021End's committeePrototype design endTestingFrSaSuMoTuWeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSaSuMoTu1234567891011121314151617181920212223242526272829303112345678910111213141516January 2021February 2021

16-11-02-1 Changing-scale-Weekly

@startgantt
printscale weekly
saturday are closed
sunday are closed
Project starts the 1st of january 2021
[Prototype design end] as [TASK1] lasts 19 days
[TASK1] is colored in Lavender/LightBlue
[Testing] lasts 14 days
[TASK1]->[Testing]
2021-01-18 to 2021-01-22 are named [End's committee]
2021-01-18 to 2021-01-22 are colored in salmon
@endgantt
1234567Jan 2021Feb 2021Prototype design endTestingJan 2021Feb 2021

16-11-02-2 Changing-scale-Weekly

@startgantt
printscale weekly
Project starts the 20th of september 2020
[Prototype design] as [TASK1] lasts 130 days
[TASK1] is colored in Lavender/LightBlue
[Testing] lasts 20 days
[TASK1]->[Testing]
2021-01-18 to 2021-01-22 are named [End's committee]
2021-01-18 to 2021-01-22 are colored in salmon
@endgantt
3940414243444546474849505152531234567SepOct 2020Nov 2020Dec 2020Jan 2021Feb 2021Prototype designTestingSepOct 2020Nov 2020Dec 2020Jan 2021Feb 2021

16-11-03-1 Changing-scale-Monthly

@startgantt
projectscale monthly
Project starts the 20th of september 2020
[Prototype design] as [TASK1] lasts 130 days
[TASK1] is colored in Lavender/LightBlue
[Testing] lasts 20 days
[TASK1]->[Testing]
2021-01-18 to 2021-01-22 are named [End's committee]
2021-01-18 to 2021-01-22 are colored in salmon
@endgantt
20202021SepOctNovDecJanFebPrototype designTestingSepOctNovDecJanFeb20202021

16-12-1 Close-day

@startgantt
project starts the 2018/04/09
saturday are closed
sunday are closed
2018/05/01 is closed
2018/04/17 to 2018/04/19 is closed
[Prototype design] lasts 14 days
[Test prototype] lasts 4 days
[Test prototype] starts at [Prototype design]'s end
[Prototype design] is colored in Fuchsia/FireBrick
[Test prototype] is colored in GreenYellow/Green
@endgantt
MoTuWeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSaSuMoTu910111213141516171819202122232425262728293012345678April 2018May 2018Prototype designTest prototypeMoTuWeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSaSuMoTu910111213141516171819202122232425262728293012345678April 2018May 2018

16-12-2 Close-day

@startgantt
2020-07-07 to 2020-07-17 is closed
2020-07-13 is open
Project starts the 2020-07-01
[Prototype design] lasts 10 days
Then [Test prototype] lasts 10 days
@endgantt
WeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSaSuMoTuWeTh123456789101112131415161718192021222324252627282930July 2020Prototype designTest prototypeWeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSaSuMoTuWeTh123456789101112131415161718192021222324252627282930July 2020

16-13-1 Simplified-task-succession

@startgantt
[Prototype design] lasts 14 days
then [Test prototype] lasts 4 days
then [Deploy prototype] lasts 6 days
@endgantt
123456789101112131415161718192021222324Prototype designTest prototypeDeploy prototype123456789101112131415161718192021222324

16-13-2 Simplified-task-succession

@startgantt
[Prototype design] lasts 14 days
[Build prototype] lasts 4 days
[Prepare test] lasts 6 days
[Prototype design] -> [Build prototype]
[Prototype design] -> [Prepare test]
@endgantt
1234567891011121314151617181920Prototype designBuild prototypePrepare test1234567891011121314151617181920

16-14-1 Separator

@startgantt
[Task1] lasts 10 days
then [Task2] lasts 4 days
-- Phase Two --
then [Task3] lasts 5 days
then [Task4] lasts 6 days
@endgantt
12345678910111213141516171819202122232425Task1Task2Phase TwoTask3Task412345678910111213141516171819202122232425

16-15-1 Working-with-resources

@startgantt
[Task1] on {Alice} lasts 10 days
[Task2] on {Bob:50%} lasts 2 days
then [Task3] on {Alice:25%} lasts 1 days
@endgantt
12345678910Task1 {Alice}Task2 {Bob:50%}Task3 {Alice:25%}Alice100100100100125125125125100100Bob5050505012345678910

16-15-2 Working-with-resources

@startgantt
[Task1] on {Alice} {Bob} lasts 20 days
@endgantt
12345678910Task1 {Alice} {Bob}Alice100100100100100100100100100100Bob10010010010010010010010010010012345678910

16-15-3 Working-with-resources

@startgantt
project starts on 2020-06-19
[Task1] on {Alice} lasts 10 days
{Alice} is off on 2020-06-24 to 2020-06-26
@endgantt
FrSaSuMoTuWeThFrSaSuMoTuWe1920212223242526272829301June 2020JulTask1 {Alice}Alice100100100100100100100100100100FrSaSuMoTuWeThFrSaSuMoTuWe1920212223242526272829301June 2020Jul

16-16-1 Complex-example

@startgantt
[Prototype design] lasts 13 days and is colored in Lavender/LightBlue
[Test prototype] lasts 9 days and is colored in Coral/Green and starts 3 days after [Prototype design]'s end
[Write tests] lasts 5 days and ends at [Prototype design]'s end
[Hire tests writers] lasts 6 days and ends at [Write tests]'s start
[Init and write tests report] is colored in Coral/Green
[Init and write tests report] starts 1 day before [Test prototype]'s start and ends at [Test prototype]'s end
@endgantt
12345678910111213141516171819202122232425Prototype designTest prototypeWrite testsHire tests writersInit and write tests report12345678910111213141516171819202122232425

16-17-1 Comments

@startgantt
' This is a comment
[T1] lasts 3 days
/' this comment
is on several lines '/
[T2] starts at [T1]'s end and lasts 1 day
@endgantt
1234T1T21234

16-18-01-1 Without-style

@startgantt
[Task1] lasts 20 days
note bottom
  memo1 ...
  memo2 ...
  explanations1 ...
  explanations2 ...
end note
[Task2] lasts 4 days
[Task1] -> [Task2]
-- Separator title --
[M1] happens on 5 days after [Task1]'s end
-- end --
@endgantt
12345678910111213141516171819202122232425memo1 ...memo2 ...explanations1 ...explanations2 ...Task1Task2Separator titleM1end12345678910111213141516171819202122232425

16-18-02-1 With-style

@startgantt
<style>
ganttDiagram {
task {
FontName Helvetica
FontColor red
FontSize 18
PlantUML Language Reference Guide (1.2021.2)
268 / 415
16.18
Using style
16
GANTT DIAGRAM
FontStyle bold
BackGroundColor GreenYellow
LineColor blue
}
milestone {
FontColor blue
FontSize 25
FontStyle italic
BackGroundColor yellow
LineColor red
}
note {
  FontColor DarkGreen
  FontSize 10
  LineColor OrangeRed
}
arrow {
FontName Helvetica
FontColor red
FontSize 18
FontStyle bold
BackGroundColor GreenYellow
LineColor blue
}
separator {
LineColor red
BackGroundColor green
FontSize 16
FontStyle bold
FontColor purple
}
}
</style>
[Task1] lasts 20 days
note bottom
  memo1 ...
  memo2 ...
  explanations1 ...
  explanations2 ...
end note
[Task2] lasts 4 days
[Task1] -> [Task2]
-- Separator title --
[M1] happens on 5 days after [Task1]'s end
-- end --
@endgantt
12345678910111213141516171819202122232425memo1 ...memo2 ...explanations1 ...explanations2 ...Task1Task2Separator titleM1end12345678910111213141516171819202122232425

16-19-1 Add-notes

@startgantt
[task01] lasts 15 days
note bottom
memo1 ...
memo2 ...
explanations1 ...
explanations2 ...
end note
[task01] -> [task02]
@endgantt
12345678910111213141516memo1 ...memo2 ...explanations1 ...explanations2 ...task01task0212345678910111213141516

16-19-2 Add-notes

@startgantt
[task01] lasts 15 days
note bottom
memo1 ...
memo2 ...
explanations1 ...
explanations2 ...
end note
[task01] -> [task02]
[task03] lasts 5 days
@endgantt
12345678910111213141516memo1 ...memo2 ...explanations1 ...explanations2 ...task01task02task0312345678910111213141516

16-19-3 Add-notes

@startgantt
-- test01 --
[task01] lasts 4 days
note bottom
'note left
memo1 ...
memo2 ...
explanations1 ...
explanations2 ...
end note
[task02] lasts 8 days
[task01] -> [task02]
note bottom
'note left
memo1 ...
memo2 ...
explanations1 ...
explanations2 ...
end note
-- test02 --
[task03] as [t3] lasts 7 days
[t3] -> [t4]
@endgantt
123456789101112memo1 ...memo2 ...explanations1 ...explanations2 ...memo1 ...memo2 ...explanations1 ...explanations2 ...test01task01task02test02task03t4123456789101112

16-19-4 Add-notes

@startgantt
Project starts 2020-09-01
[taskA] starts 2020-09-01 and lasts 3 days
[taskB] starts 2020-09-10 and lasts 3 days
[taskB] displays on same row as [taskA]
[task01] starts 2020-09-05 and lasts 4 days
then [task02] lasts 8 days
note bottom
note for task02
more notes
end note
then [task03] lasts 7 days
note bottom
note for task03
more notes
end note
-- separator --
[taskC] starts 2020-09-02 and lasts 5 days
[taskD] starts 2020-09-09 and lasts 5 days
[taskD] displays on same row as [taskC]
[task 10] starts 2020-09-05 and lasts 5 days
then [task 11] lasts 5 days
note bottom
note for task11
more notes
end note
@endgantt
TuWeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSaSuMoTuWe1234567891011121314151617181920212223September 2020note for task02more notesnote for task03more notesnote for task11more notestaskAtaskBtask01task02task03separatortaskCtaskDtask 10task 11TuWeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSaSuMoTuWe1234567891011121314151617181920212223September 2020

16-20-1 Pause-tasks

@startgantt
Project starts the 5th of december 2018
saturday are closed
sunday are closed
2018/12/29 is opened
[Prototype design] lasts 17 days
[Prototype design] pauses on 2018/12/13
[Prototype design] pauses on 2018/12/14
[Prototype design] pauses on monday
[Test prototype] starts at [Prototype design]'s end and lasts 2 weeks
@endgantt
WeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSaSuMoTuWeTh56789101112131415161718192021222324252627282930311234567891011121314151617December 2018January 2019Prototype designTest prototypeWeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSaSuMoTuWeTh56789101112131415161718192021222324252627282930311234567891011121314151617December 2018January 2019

16-21-1 Change-link-colors

@startgantt
[T1] lasts 4 days
[T2] lasts 4 days and starts 3 days after [T1]'s end with blue dotted link
[T3] lasts 4 days and starts 3 days after [T2]'s end with green bold link
[T4] lasts 4 days and starts 3 days after [T3]'s end with green dashed link
@endgantt
12345678910111213141516171819202122232425T1T2T3T412345678910111213141516171819202122232425

16-21-2 Change-link-colors

@startgantt
<style>
ganttDiagram {
arrow {
LineColor blue
  }
}
</style>
[Prototype design] lasts 7 days
[Build prototype] lasts 4 days
[Prepare test] lasts 6 days
[Prototype design] -[#FF00FF]-> [Build prototype]
[Prototype design] -[dotted]-> [Prepare test]
Then [Run test]  lasts 4 days
@endgantt
1234567891011121314151617Prototype designBuild prototypePrepare testRun test1234567891011121314151617

16-22-1 Tasks-or-Milestones-on-the-same-line

@startgantt
[Prototype design] lasts 13 days
[Test prototype] lasts 4 days and 1 week
[Test prototype] starts 1 week and 2 days after [Prototype design]'s end
[Test prototype] displays on same row as [Prototype design]
[r1] happens on 5 days after [Prototype design]'s end
[r2] happens on 5 days after [r1]'s end
[r3] happens on 5 days after [r2]'s end
[r2] displays on same row as [r1]
[r3] displays on same row as [r1]
@endgantt
123456789101112131415161718192021222324252627282930313233Prototype designTest prototyper1r2r3123456789101112131415161718192021222324252627282930313233

16-23-1 Highlight-today

@startgantt
Project starts the 20th of september 2018
sunday are close
2018/09/21 to 2018/09/23 are colored in salmon
2018/09/21 to 2018/09/30 are named [Vacation in the Bahamas]
today is 30 days after start and is colored in #AAF
[Foo] happens 40 days after start
[Dummy] lasts 10 days and starts 10 days after start
@endgantt
ThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSaSuMoTu2021222324252627282930123456789101112131415161718192021222324252627282930September 2018October 2018Vacation in the BahamasFooDummyThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSaSuMoTuWeThFrSaSuMoTu2021222324252627282930123456789101112131415161718192021222324252627282930September 2018October 2018

16-24-1 Task-between-two-milestones

@startgantt
project starts on 2020-07-01
[P_start] happens 2020-07-03
[P_end] happens 2020-07-13
[Prototype design] occurs from [P_start] to [P_end]
@endgantt
WeThFrSaSuMoTuWeThFrSaSuMo12345678910111213July 2020P_startP_endPrototype designWeThFrSaSuMoTuWeThFrSaSuMo12345678910111213July 2020

16-26-1 Add-title-header-footer-caption-or-legend-on-gantt-diagram

@startgantt
header some header
footer some footer
title My title
[Prototype design] lasts 13 days
legend
  The legend
end legend
caption This is caption
@endgantt
some headerMy title12345678910111213Prototype design12345678910111213The legendThis is captionsome footer

16-27-1 Removing-Foot-Boxes

@startgantt
hide footbox
title Foot Box removed
[Prototype design] lasts 15 days
[Test prototype] lasts 10 days
@endgantt
Foot Box removed123456789101112131415Prototype designTest prototype

16-27-2 Removing-Foot-Boxes

@startgantt
Project starts the 20th of september 2017
[Prototype design] as [TASK1] lasts 13 days
[TASK1] is colored in Lavender/LightBlue
hide footbox
@endgantt
WeThFrSaSuMoTuWeThFrSaSuMo202122232425262728293012September 2017OctPrototype design

16-27-3 Removing-Foot-Boxes

@startgantt
hide footbox
printscale weekly
saturday are closed
sunday are closed
Project starts the 1st of january 2021
[Prototype design end] as [TASK1] lasts 19 days
[TASK1] is colored in Lavender/LightBlue
[Testing] lasts 14 days
[TASK1]->[Testing]
2021-01-18 to 2021-01-22 are named [End's committee]
2021-01-18 to 2021-01-22 are colored in salmon
@endgantt
1234567Jan 2021Feb 2021Prototype design endTesting

16-27-4 Removing-Foot-Boxes

@startgantt
hide footbox
projectscale monthly
Project starts the 20th of september 2020
[Prototype design] as [TASK1] lasts 130 days
[TASK1] is colored in Lavender/LightBlue
[Testing] lasts 20 days
[TASK1]->[Testing]
2021-01-18 to 2021-01-22 are named [End's committee]
2021-01-18 to 2021-01-22 are colored in salmon
@endgantt
20202021SepOctNovDecJanFebPrototype designTesting

17-01-1 OrgMode-syntax

@startmindmap
* Debian
** Ubuntu
*** Linux Mint
*** Kubuntu
*** Lubuntu
*** KDE Neon
** LMDE
** SolydXK
** SteamOS
** Raspbian with a very long name
*** <s>Raspmbc</s> => OSMC
*** <s>Raspyfi</s> => Volumio
@endmindmap
DebianUbuntuLinux MintKubuntuLubuntuKDE NeonLMDESolydXKSteamOSRaspbian with a very long nameRaspmbc=> OSMCRaspyfi=> Volumio

17-02-1 Markdown-syntax

@startmindmap
* root node
  * some first level node
    * second level node
    * another second level node
  * another first level node
@endmindmap
root nodesome first level nodesecond level nodeanother second level nodeanother first level node

17-03-1 Arithmetic-notation

@startmindmap
+ OS
++ Ubuntu
+++ Linux Mint
+++ Kubuntu
+++ Lubuntu
+++ KDE Neon
++ LMDE
++ SolydXK
++ SteamOS
++ Raspbian
-- Windows 95
-- Windows 98
-- Windows NT
--- Windows 8
--- Windows 10
@endmindmap
OSUbuntuLinux MintKubuntuLubuntuKDE NeonLMDESolydXKSteamOSRaspbianWindows 95Windows 98Windows NTWindows 8Windows 10

17-04-1 Multilines

@startmindmap
* Class Templates
**:Example 1
<code>
template <typename T>
class cname{
void f1()<U+003B>
...
}
</code>
;
**:Example 2
<code>
other template <typename T>
class cname{
...
</code>
;
@endmindmap
Class TemplatesExample 1template <typename T>class cname{void f1()<U+003B>...} Example 2other template <typename T>class cname{... 

17-05-01-1 With-inline-color

@startmindmap
*[#Orange] Colors
**[#lightgreen] Green
**[#FFBBCC] Rose
**[#lightblue] Blue
@endmindmap
ColorsGreenRoseBlue

17-05-01-2 With-inline-color

@startmindmap
+[#Orange] Colors
++[#lightgreen] Green
++[#FFBBCC] Rose
--[#lightblue] Blue
@endmindmap
ColorsGreenRoseBlue

17-05-01-3 With-inline-color

@startmindmap
*[#Orange] root node
 *[#lightgreen] some first level node
  *[#FFBBCC] second level node
  *[#lightblue] another second level node
 *[#lightgreen] another first level node
@endmindmap
root nodesome first level nodesecond level nodeanother second level nodeanother first level node

17-05-02-1 With-style-color

@startmindmap
<style>
mindmapDiagram {
  .green {
    BackgroundColor lightgreen
  }
  .rose {
    BackgroundColor #FFBBCC
  }
  .your_style_name {
    BackgroundColor lightblue
  }
}
</style>
* Colors
** Green <<green>>
** Rose <<rose>>
** Blue <<your_style_name>>
@endmindmap
ColorsGreenRoseBlue

17-05-02-2 With-style-color

@startmindmap
<style>
mindmapDiagram {
  .green {
    BackgroundColor lightgreen
  }
  .rose {
    BackgroundColor #FFBBCC
  }
  .your_style_name {
    BackgroundColor lightblue
  }
}
</style>
+ Colors
++ Green <<green>>
++ Rose <<rose>>
-- Blue <<your_style_name>>
@endmindmap
ColorsGreenRoseBlue

17-05-02-3 With-style-color

@startmindmap
<style>
mindmapDiagram {
  .green {
    BackgroundColor lightgreen
  }
  .rose {
    BackgroundColor #FFBBCC
  }
  .your_style_name {
    BackgroundColor lightblue
  }
}
</style>
* root node
 * some first level node <<green>>
  * second level node <<rose>>
  * another second level node <<your_style_name>>
 * another first level node <<green>>
@endmindmap
root nodesome first level nodesecond level nodeanother second level nodeanother first level node

17-06-1 Removing-box

@startmindmap
* root node
** some first level node
***_ second level node
***_ another second level node
***_ foo
***_ bar
***_ foobar
** another first level node
@endmindmap
root nodesome first level nodesecond level nodeanother second level nodefoobarfoobaranother first level node

17-06-2 Removing-box

@startmindmap
*_ root node
**_ some first level node
***_ second level node
***_ another second level node
***_ foo
***_ bar
***_ foobar
**_ another first level node
@endmindmap
root nodesome first level nodesecond level nodeanother second level nodefoobarfoobaranother first level node

17-06-3 Removing-box

@startmindmap
+ root node
++ some first level node
+++_ second level node
+++_ another second level node
+++_ foo
+++_ bar
+++_ foobar
++_ another first level node
-- some first right level node
--_ another first right level node
@endmindmap
root nodesome first level nodesecond level nodeanother second level nodefoobarfoobaranother first level nodesome first right level nodeanother first right level node

17-07-1 Changing-diagram-direction

@startmindmap
* count
** 100
*** 101
*** 102
** 200
left side
** A
*** AA
*** AB
** B
@endmindmap
count100101102200AAAABB

17-08-1 Complete-example

@startmindmap
caption figure 1
title My super title

* <&flag>Debian
** <&globe>Ubuntu
*** Linux Mint
*** Kubuntu
*** Lubuntu
*** KDE Neon
** <&graph>LMDE
** <&pulse>SolydXK
** <&people>SteamOS
** <&star>Raspbian with a very long name
*** <s>Raspmbc</s> => OSMC
*** <s>Raspyfi</s> => Volumio
header
My super header
endheader
center footer My super footer
legend right
Short
legend
endlegend
@endmindmap
My super headerMy super titleDebianUbuntuLinux MintKubuntuLubuntuKDE NeonLMDESolydXKSteamOSRaspbian with a very long nameRaspmbc=> OSMCRaspyfi=> VolumioShortlegendfigure 1My super footer

17-09-01-1 Changing-style-node-depth

@startmindmap
<style>
mindmapDiagram {
  node {
    BackgroundColor lightGreen
  }
  :depth(1) {
    BackGroundColor white
  }
}
</style>
* Linux
** NixOS
** Debian
*** Ubuntu
**** Linux Mint
**** Kubuntu
**** Lubuntu
**** KDE Neon
@endmindmap
LinuxNixOSDebianUbuntuLinux MintKubuntuLubuntuKDE Neon

17-09-02-1 Changing-style-boxless

@startmindmap
<style>
mindmapDiagram {
  node {
    BackgroundColor lightGreen
  }
  boxless {
    FontColor darkgreen
  }
}
</style>
* Linux
** NixOS
** Debian
***_ Ubuntu
**** Linux Mint
**** Kubuntu
**** Lubuntu
**** KDE Neon
@endmindmap
LinuxNixOSDebianUbuntuLinux MintKubuntuLubuntuKDE Neon

17-10-1 Word-Wrap

@startmindmap
<style>
node {
  Padding 12
  Margin 3
  HorizontalAlignment center
  LineColor blue
  LineThickness 3.0
  BackgroundColor gold
  RoundCorner 40
  MaximumWidth 100
}
rootNode {
  LineStyle 8.0;3.0
  LineColor red
  BackgroundColor white
  LineThickness 1.0
  RoundCorner 0
  Shadowing 0.0
}
leafNode {
  LineColor gold
  RoundCorner 0
  Padding 3
}
arrow {
  LineStyle 4
  LineThickness 0.5
  LineColor green
}
</style>
* Hi =)
** sometimes i have node in wich i want to write a long text
*** this results in really huge diagram
**** of course, i can explicit split with a\nnew line
**** but it could be cool if PlantUML was able to split long lines, maybe with an option
@endmindmap
Hi =)sometimes ihave node inwich i want towrite a longtextthis results inreally hugediagramof course, i canexplicit splitwith anew linebut it could becool ifPlantUML wasable to splitlong lines,maybe with anoption

18-01-1 OrgMode-syntax

@startwbs
* Business Process Modelling WBS
** Launch the project
*** Complete Stakeholder Research
*** Initial Implementation Plan
** Design phase
*** Model of AsIs Processes Completed
**** Model of AsIs Processes Completed1
**** Model of AsIs Processes Completed2
*** Measure AsIs performance metrics
*** Identify Quick Wins
** Complete innovate phase
@endwbs
Launch the projectComplete Stakeholder ResearchInitial Implementation PlanDesign phaseModel of AsIs Processes CompletedModel of AsIs Processes Completed1Model of AsIs Processes Completed2Measure AsIs performance metricsIdentify Quick WinsComplete innovate phaseBusiness Process Modelling WBS

18-02-1 Change-direction

@startwbs
* Business Process Modelling WBS
** Launch the project
*** Complete Stakeholder Research
*** Initial Implementation Plan
** Design phase
*** Model of AsIs Processes Completed
****< Model of AsIs Processes Completed1
****> Model of AsIs Processes Completed2
***< Measure AsIs performance metrics
***< Identify Quick Wins
@endwbs
Launch the projectComplete Stakeholder ResearchInitial Implementation PlanDesign phaseMeasure AsIs performance metricsIdentify Quick WinsModel of AsIs Processes CompletedModel of AsIs Processes Completed1Model of AsIs Processes Completed2Business Process Modelling WBS

18-03-1 Arithmetic-notation

@startwbs
+ New Job
++ Decide on Job Requirements
+++ Identity gaps
+++ Review JDs
++++ Sign-Up for courses
++++ Volunteer
++++ Reading
++- Checklist
+++- Responsibilities
+++- Location
++ CV Upload Done
+++ CV Updated
++++ Spelling & Grammar
++++ Check dates
---- Skills
+++ Recruitment sites chosen
@endwbs
Decide on Job RequirementsChecklistResponsibilitiesLocationIdentity gapsReview JDsSign-Up for coursesVolunteerReadingCV Upload DoneCV UpdatedSkillsSpelling & GrammarCheck datesRecruitment sites chosenNew Job

18-04-02-1 Several-boxless-node

@startwbs
+ Project
 + Part One
  + Task 1.1
   - LeftTask 1.2
   + Task 1.3
  + Part Two
   + Task 2.1
   + Task 2.2
   -_ Task 2.2.1 To the left boxless
   -_ Task 2.2.2 To the Left boxless
   +_ Task 2.2.3 To the right boxless
@endwbs
Part OneTask 1.1LeftTask 1.2Task 1.3Part TwoTask 2.2.1 To the left boxlessTask 2.2.2 To the Left boxlessTask 2.1Task 2.2Task 2.2.3 To the right boxlessProject

18-04-03-1 All-boxless-node

@startwbs
+_ Project
 +_ Part One
  +_ Task 1.1
   -_ LeftTask 1.2
   +_ Task 1.3
  +_ Part Two
   +_ Task 2.1
   +_ Task 2.2
   -_ Task 2.2.1 To the left boxless
   -_ Task 2.2.2 To the Left boxless
   +_ Task 2.2.3 To the right boxless
@endwbs
Part OneTask 1.1LeftTask 1.2Task 1.3Part TwoTask 2.2.1 To the left boxlessTask 2.2.2 To the Left boxlessTask 2.1Task 2.2Task 2.2.3 To the right boxlessProject

18-04-05-1 Several-boxless-node

@startwbs
* World
** America
***_ Canada
***_ Mexico
***_ USA
** Europe
***_ England
***_ Germany
***_ Spain
@endwbs
AmericaCanadaMexicoUSAEuropeEnglandGermanySpainWorld

18-04-06-1 All-boxless-node

@startwbs
*_ World
**_ America
***_ Canada
***_ Mexico
***_ USA
**_ Europe
***_ England
***_ Germany
***_ Spain
@endwbs
AmericaCanadaMexicoUSAEuropeEnglandGermanySpainWorld

18-05-1 Colors

@startwbs
*[#SkyBlue] this is the partner workpackage
**[#pink] this is my workpackage
** this is another workpackage
@endwbs
this is my workpackagethis is another workpackagethis is the partner workpackage

18-05-2 Colors

@startwbs
+[#SkyBlue] this is the partner workpackage
++[#pink] this is my workpackage
++ this is another workpackage
@endwbs
this is my workpackagethis is another workpackagethis is the partner workpackage

18-05-3 Colors

@startwbs
<style>
wbsDiagram {
  .pink {
    BackgroundColor pink
  }
  .your_style_name {
    BackgroundColor SkyBlue
  }
}
</style>
* this is the partner workpackage <<your_style_name>>
** this is my workpackage <<pink>>
** this is another workpackage
@endwbs
this is my workpackagethis is another workpackagethis is the partner workpackage

18-05-4 Colors

@startwbs
<style>
wbsDiagram {
  .pink {
    BackgroundColor pink
  }
  .your_style_name {
    BackgroundColor SkyBlue
  }
}
</style>
+ this is the partner workpackage <<your_style_name>>
++ this is my workpackage <<pink>>
++ this is another workpackage
@endws
this is my workpackagethis is another workpackagethis is the partner workpackage

18-06-1 Using-style

@startwbs
<style>
wbsDiagram {
  // all lines (meaning connector and borders, there are no other lines in WBS) are black by default
  Linecolor black
  arrow {
    // note that connector are actually "arrow" even if they don't look like as arrow
    // This is to be consistent with other UML diagrams. Not 100% sure that it's a good idea
    // So now connector are green
    LineColor green
  }
  :depth(0) {
    // will target root node
    BackgroundColor White
    RoundCorner 10
    LineColor red
    // Because we are targetting depth(0) for everything, border and connector for level 0 will be red
  }
  arrow {
    :depth(2) {
      // Targetting only connector between Mexico-Chihuahua and USA-Texas
      LineColor blue
      LineStyle 4
      LineThickness .5
    }
  }
  node {
    :depth(2) {
      LineStyle 2
      LineThickness 2.5
    }
  }
  boxless {
    // will target boxless node with '_'
    FontColor darkgreen
  }
}
</style>
* World
** America
*** Canada
*** Mexico
**** Chihuahua
*** USA
**** Texas
***< New York
** Europe
***_ England
***_ Germany
***_ Spain
@endwbs
AmericaNew YorkCanadaMexicoChihuahuaUSATexasEuropeEnglandGermanySpainWorld

18-07-1 Word-Wrap

@startwbs
<style>
node {
  Padding 12
  Margin 3
  HorizontalAlignment center
  LineColor blue
  LineThickness 3.0
  BackgroundColor gold
  RoundCorner 40
  MaximumWidth 100
}

rootNode {
  LineStyle 8.0;3.0
  LineColor red
  BackgroundColor white
  LineThickness 1.0
  RoundCorner 0
  Shadowing 0.0
}
leafNode {
  LineColor gold
  RoundCorner 0
  Padding 3
}
arrow {
  LineStyle 4
  LineThickness 0.5
  LineColor green
}
</style>
* Hi =)
** sometimes i have node in wich i want to write a long text
*** this results in really huge diagram
**** of course, i can explicit split with a\nnew line
**** but it could be cool if PlantUML was able to split long lines, maybe with an option who specify the maximum width of a node
@endwbs
sometimes i havenode in wich iwant to write along textthis results inreally hugediagramof course, i canexplicit split withanew linebut it could becool if PlantUMLwas able to splitlong lines, maybewith an optionwho specify themaximum widthof a nodeHi =)

19-01-1 Standalone-diagram

@startmath
f(t)=(a_0)/2 + sum_(n=1)^ooa_ncos((npit)/L)+sum_(n=1)^oo b_n\ sin((npit)/L)
@endmath
f(t)=(a_0)/2 + sum_(n=1)^ooa_ncos((npit)/L)+sum_(n=1)^oo b_n\ sin((npit)/L)

19-01-2 Standalone-diagram

@startlatex
\sum_{i=0}^{n-1} (a_i + b_i^2)
@endlatex
\sum_{i=0}^{n-1} (a_i + b_i^2)

19-1 Maths

@startuml
:<math>int_0^1f(x)dx</math>;
:<math>x^2+y_1+z_12^34</math>;
note right
  Try also
  <math>d/dxf(x)=lim_(h->0)(f(x+h)-f(x))/h</math>
  <latex>P(y|\mathbf{x}) \mbox{ or } f(\mathbf{x})+\epsilon</latex>
end note
@enduml
Try also

19-2 Maths

@startuml
Bob -> Alice : Can you solve: <math>ax^2+bx+c=0</math>
Alice --> Bob: <math>x = (-b+-sqrt(b^2-4ac))/(2a)</math>
@enduml
BobBobAliceAliceCan you solve:

20-01-1 Information-Engineering-Relations

@startuml
Entity01 }|..|| Entity02
Entity03 }o..o| Entity04
Entity05 ||--o{ Entity06
Entity07 |o--|| Entity08
@enduml

Entity01Entity02Entity03Entity04Entity05Entity06Entity07Entity08

20-02-1 Entities

@startuml
entity Entity01 {
  * identifying_attribute
  --
  * mandatory_attribute
  optional_attribute
}
@enduml

Entity01identifying_attributemandatory_attributeoptional_attribute

20-02-2 Entities

@startuml
entity Entity01 {
  optional attribute
  **optional bold attribute**
  * **mandatory bold attribute**
}
@enduml

Entity01optional attributeoptional bold attributemandatory bold attribute

20-03-1 Complete-Example

@startuml

' hide the spot
hide circle

' avoid problems with angled crows feet
skinparam linetype ortho

entity "Entity01" as e01 {
  *e1_id : number <<generated>>
  --
  *name : text
  description : text
}

entity "Entity02" as e02 {
  *e2_id : number <<generated>>
  --
  *e1_id : number <<FK>>
  other_details : text
}

entity "Entity03" as e03 {
  *e3_id : number <<generated>>
  --
  e1_id : number <<FK>>
  other_details : text
}

e01 ||..o{ e02
e01 |o..o{ e03

@enduml

Entity01e1_id : number «generated»name : textdescription : textEntity02e2_id : number «generated»e1_id : number «FK»other_details : textEntity03e3_id : number «generated»e1_id : number «FK»other_details : text

21-02-1 Zoom

@startuml
scale 180*90
Bob->Alice : hello
@enduml
BobBobAliceAlicehello

21-03-1 Title

@startuml
skinparam titleBorderRoundCorner 15
skinparam titleBorderThickness 2
skinparam titleBorderColor red
skinparam titleBackgroundColor Aqua-CadetBlue
title Simple communication\nexample
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
@enduml
Simple communicationexampleAliceAliceBobBobAuthentication RequestAuthentication Response

21-03-2 Title

@startuml
title
  <u>Simple</u> communication example
  on <i>several</i> lines and using <back:cadetblue>creole tags</back>
end title
Alice -> Bob: Authentication Request
Bob -> Alice: Authentication Response
@enduml
Simplecommunication exampleonseverallines and usingcreole tagsAliceAliceBobBobAuthentication RequestAuthentication Response

21-04-1 Caption

@startuml
caption figure 1
Alice -> Bob: Hello
@enduml
figure 1AliceAliceBobBobHello

21-05-1 Footer-and-header

@startuml
Alice -> Bob: Authentication Request
header
<font color=red>Warning:</font>
Do not use in production.
endheader
center footer Generated for demonstration
@enduml
AliceAliceBobBobAuthentication RequestWarning:Do not use in production.Generated for demonstration

21-06-1 Legend-the-diagram

@startuml
Alice -> Bob : Hello
legend right
  Short
  legend
  endlegend
@enduml
AliceAliceBobBobHelloShortlegend

21-06-2 Legend-the-diagram

@startuml
Alice -> Bob : Hello
legend top left
  Short
  legend
  endlegend
@enduml
AliceAliceBobBobHelloShortlegend

22-01-1 Emphasized-text

@startuml
Alice -> Bob : hello --there-- here
... Some ~~long delay~~ ...
Bob -> Alice : ok
note left
  This is **bold**
  This is //italics//
  This is ""monospaced""
  This is --stricken-out--
  This is __underlined__
  This is ~~wave-underlined~~
end note
@enduml

AliceAliceBobBobhellotherehereSomelong delay okThis isboldThis isitalicsThis ismonospacedThis isstricken-outThis isunderlinedThis iswave-underlined

22-02-1 Lists

@startuml
object demo {
  * Bullet list
  * Second item
}
note left
  * Bullet list
  * Second item
  ** Sub item
end note

legend
  # Numbered list
  # Second item
  ## Sub item
  ## Another sub item
  * Can't quite mix
  * Numbers and bullets
  # Third item
end legend
@enduml

demoBullet listSecond itemBullet listSecond itemSub item1.Numbered list2.Second item1.Sub item2.Another sub itemCan't quite mixNumbers and bullets3.Third item

22-03-1 Escape-character

@startuml
object demo {
  This is not ~___underscored__.
  This is not ~""monospaced"".
}
@enduml

demoThis is not ___underscored__.This is not ""monospaced"".

22-04-1 Horizontal-lines

@startuml
database DB1 as "
You can have horizontal line
----
Or double line
====
Or strong line
____
Or dotted line
..My title..
Enjoy!
"
note right
  This is working also in notes
  You can also add title in all these lines
  ==Title==
  --Another title--
end note

@enduml

You can have horizontal lineOr double lineOr strong lineOr dotted lineEnjoy!My titleThis is working also in notesYou can also add title in all these linesTitleAnother title

22-05-1 Headingsuml

@startuml
usecase UC1 as "
= Extra-large heading
Some text
== Large heading
Other text
=== Medium heading
Information
....
==== Small heading"
@enduml

Extra-large headingSome textLarge headingOther textMedium headingInformationSmall heading

22-06-1 Legacy-HTML

@startuml
:* You can change <color:red>text color</color>
* You can change <back:cadetblue>background color</back>
* You can change <size:18>size</size>
* You use <u>legacy</u> <b>HTML <i>tag</i></b>
* You use <u:red>color</u> <s:green>in HTML</s> <w:#0000FF>tag</w>
----
* Use image : <img:http://plantuml.com/logo3.png>
;
@enduml

You can changetext colorYou can changebackground colorYou can changesizeYou uselegacy HTMLtagYou usecolor in HTML tagUse image :(Cannot decode: http://plantuml.com/logo3.png) 

22-07-1 Code

@startuml
Alice -> Bob : hello
note right
  <code>
  main() {
  printf("Hello world");
}
</code>
end note
@enduml

AliceAliceBobBobhello<code>main() {printf("Hello world");}</code>

22-07-2 Code

@startuml
Alice -> Bob : hello
note left
  <code>
  This is **bold**
  This is //italics//
  This is ""monospaced""
  This is --stricken-out--
  This is __underlined__
  This is ~~wave-underlined~~
  --test Unicode and icons--
  This is <U+221E> long
  This is a <&code> icon
  </code>
end note
note right
  This is **bold**
  This is //italics//
  This is ""monospaced""
  This is --stricken-out--
  This is __underlined__
  This is ~~wave-underlined~~
  --test Unicode and icons--
  This is <U+221E> long
  This is a <&code> icon
end note
@enduml

AliceAliceBobBobhelloThis is **bold**This is //italics//This is ""monospaced""This is --stricken-out--This is __underlined__This is ~~wave-underlined~~This is ∞ longThis is aicon</code>test Unicode and iconsThis isboldThis isitalicsThis ismonospacedThis isstricken-outThis isunderlinedThis iswave-underlinedThis is ∞ longThis is aicontest Unicode and icons

22-08-01-1 Create-a-table

@startuml
skinparam titleFontSize 14
title
  Example of simple table
  |= |= table |= header |
  | a | table | row |
  | b | table | row |
end title
[*] --> State1
@enduml

Example of simple table tableheaderatablerowbtablerowState1

22-08-02-1 Add-color-on-rows-or-cells

@startuml
start
:Here is the result
|= |= table |= header |
| a | table | row |
|<#FF8080> red |<#80FF80> green |<#8080FF> blue |
<#yellow>| b | table | row |;
@enduml

Here is the result tableheaderatablerowredgreenbluebtablerow

22-08-03-1 Add-color-on-border-and-text

@startuml
title
  <#lightblue,#red>|=  Step  |=  Date  |=  Name  |=  Status  |=  Link  |
  <#lightgreen>|  1.1  |  TBD  | plantuml news |<#Navy><color:OrangeRed><b> Unknown  | [[https://plantuml.com/news plantuml news]] |
end title
@enduml

StepDateNameStatusLink1.1TBDplantuml newsUnknown plantuml news 

22-08-04-1 No-border-or-same-color-as-the-background

@startuml
node n
note right of n
  <#FBFB77,#FBFB77>|= Husky / Yorkie |= Foo |
  | SourceTree1 | foo1 |
  | ST2 | foo2 |
end note
@enduml

nHusky / YorkieFooSourceTree1foo1ST2foo2

22-08-05-1 Bold-header-or-not

@startuml
note as deepCSS0
  |<#white> Husky / Yorkie |
  |=<#gainsboro> SourceTree0 |
endnote

note as deepCSS1
  |= <#white> Husky / Yorkie |= Foo |
  |<#gainsboro><r> SourceTree1 | foo1 |
endnote

note as deepCSS2
  |= Husky / Yorkie |
  |<#gainsboro> SourceTree2 |
endnote

note as deepCSS3
  <#white>|= Husky / Yorkie |= Foo |
  |<#gainsboro> SourceTree1 | foo1 |
endnote
@enduml

Husky / YorkieSourceTree0Husky / YorkieFooSourceTree1foo1Husky / YorkieSourceTree2Husky / YorkieFooSourceTree1foo1

22-09-1 Tree

@startuml
skinparam titleFontSize 14
title
  Example of Tree
  |_ First line
  |_ **Bom (Model)**
  |_ prop1
  |_ prop2
  |_ prop3
  |_ Last line
end title
[*] --> State1
@enduml

Example of TreeFirst line Bom (Model)prop1prop2prop3Last lineState1

22-09-2 Tree

@startuml
class Foo {
  **Bar (Model)**
  |_ prop
  |_ **Bom (Model)**
  |_ prop2
  |_ prop3
  |_ prop3.1
  |_ prop4 :(
  --
}
@enduml

FooBar (Model)prop Bom (Model)prop2prop3prop3.1prop4 :(

22-09-3 Tree

@startuml
[A] as A
rectangle "Box B" {
  component B [
  Level 1
  |_ Level 2a
  |_ Level 3a
  |_ Level 3b
  |_ Level 3c
  |_ Level 4a
  |_ Level 3d
  |_ Level 2b
  |_ Level 3e
  ]
}
A -> B
@enduml

Box BLevel 1Level 2aLevel 3aLevel 3bLevel 3cLevel 4aLevel 3dLevel 2bLevel 3eA

22-10-1 Special-characters

@startuml
usecase direct as "this is ∞ long"
usecase ampHash as "this is also &#8734; long"
usecase angleBrackets as "this is also <U+221E> long"
@enduml

this is ∞ longthis is also ∞ longthis is also ∞ long

22-11-1 OpenIconic

@startuml
title: <size:20><&heart>Use of OpenIconic<&heart></size>
class Wifi
note left
  Click on <&wifi>
end note
@enduml

Use of OpenIconicWifiClick on

22-11-2 OpenIconic

@startuml
listopeniconic
@enduml

List Open IconicCredit tohttps://useiconic.com/open account-loginaccount-logoutaction-redoaction-undoalign-centeralign-leftalign-rightaperturearrow-bottomarrow-circle-bottomarrow-circle-leftarrow-circle-rightarrow-circle-toparrow-leftarrow-rightarrow-thick-bottomarrow-thick-leftarrow-thick-rightarrow-thick-toparrow-topaudio-spectrumaudiobadgebanbar-chartbasketbattery-emptybattery-fullbeakerbellbluetoothboldboltbookbookmarkboxbriefcasebritish-poundbrowserbrushbugbullhorncalculatorcalendarcamera-slrcaret-bottomcaret-leftcaret-rightcaret-topcartchatcheckchevron-bottomchevron-leftchevron-rightchevron-topcircle-checkcircle-xclipboardclockcloud-downloadcloud-uploadcloudcloudycodecogcollapse-downcollapse-leftcollapse-rightcollapse-upcommandcomment-squarecompasscontrastcopywritingcredit-cardcropdashboarddata-transfer-downloaddata-transfer-uploaddeletedialdocumentdollardouble-quote-sans-leftdouble-quote-sans-rightdouble-quote-serif-leftdouble-quote-serif-rightdropletejectelevatorellipsesenvelope-closedenvelope-openeuroexcerptexpand-downexpand-leftexpand-rightexpand-upexternal-linkeyeeyedropperfilefireflagflashfolderforkfullscreen-enterfullscreen-exitglobegraphgrid-four-upgrid-three-upgrid-two-uphard-driveheaderheadphoneshearthomeimageinboxinfinityinfoitalicjustify-centerjustify-leftjustify-rightkeylaptoplayerslightbulblink-brokenlink-intactlist-richlistlocationlock-lockedlock-unlockedloop-circularloop-squareloopmagnifying-glassmap-markermapmedia-pausemedia-playmedia-recordmedia-skip-backwardmedia-skip-forwardmedia-step-backwardmedia-step-forwardmedia-stopmedical-crossmenumicrophoneminusmonitormoonmovemusical-notepaperclippencilpeoplepersonphonepie-chartpinplay-circlepluspower-standbyprintprojectpulsepuzzle-piecequestion-markrainrandomreloadresize-bothresize-heightresize-widthrss-altrssscriptshare-boxedshareshieldsignalsignpostsort-ascendingsort-descendingspreadsheetstarsuntablettagtagstargettaskterminaltextthumb-downthumb-uptimertransfertrashunderlinevertical-align-bottomvertical-align-centervertical-align-topvideovolume-highvolume-lowvolume-offwarningwifiwrenchxyenzoom-inzoom-out

22-12-01-1 Activity

@startuml
start
:**test list 1**
* Bullet list
* Second item
** Sub item
*** Sub sub item
* Third item
----
**test list 2**
# Numbered list
# Second item
## Sub item
## Another sub item
# Third item;
stop
@enduml

test list 1Bullet listSecond itemSub itemSub sub itemThird itemtest list 21.Numbered list2.Second item1.Sub item2.Another sub item3.Third item

22-12-02-1 Class

@startuml

class a {
  **test list 1**
  * Bullet list
  * Second item
  ** Sub item
  *** Sub sub item
  * Third item
  ----
  **test list 2**
  # Numbered list
  # Second item
  ## Sub item
  ## Another sub item
  # Third item
}

a -- b

@enduml

atest list 1Bullet listSecond item** Sub item*** Sub sub itemThird itemtest list 2Numbered listSecond item## Sub item## Another sub itemThird itemb

22-12-03-1 Component-Deployment-Use-Case

@startuml
node n [
**test list 1**
* Bullet list
* Second item
** Sub item
*** Sub sub item
* Third item
----
**test list 2**
# Numbered list
# Second item
## Sub item
## Another sub item
# Third item
]

file f as "
**test list 1**
* Bullet list
* Second item
** Sub item
*** Sub sub item
* Third item
----
**test list 2**
# Numbered list
# Second item
## Sub item
## Another sub item
# Third item
"
@enduml

test list 1Bullet listSecond itemSub itemSub sub itemThird itemtest list 21.Numbered list2.Second item1.Sub item2.Another sub item3.Third itemtest list 1Bullet listSecond itemSub itemSub sub itemThird itemtest list 21.Numbered list2.Second item1.Sub item2.Another sub item3.Third item

22-12-05-1 Object

@startuml
object user {
  **test list 1**
  * Bullet list
  * Second item
  ** Sub item
  *** Sub sub item
  * Third item
  ----  
  **test list 2**
  # Numbered list
  # Second item
  ## Sub item
  ## Another sub item
  # Third item
}

@enduml

usertest list 1Bullet listSecond item** Sub item*** Sub sub itemThird itemtest list 2Numbered listSecond item## Sub item## Another sub itemThird item

22-12-06-1 MindMap

@startmindmap

* root
** d1
**:**test list 1**
* Bullet list
* Second item
** Sub item
*** Sub sub item
* Third item
----
**test list 2**
# Numbered list
# Second item
## Sub item
## Another sub item
# Third item;


@endmindmap

rootd1test list 1Bullet listSecond itemSub itemSub sub itemThird itemtest list 21.Numbered list2.Second item1.Sub item2.Another sub item3.Third item

22-12-08-1 Note

@startuml
note as n
  **test list 1**
  * Bullet list
  * Second item
  ** Sub item
  *** Sub sub item
  * Third item
  ----
  **test list 2**
  # Numbered list
  # Second item
  ## Sub item
  ## Another sub item
  # Third item
end note
@enduml

test list 1Bullet listSecond itemSub itemSub sub itemThird itemtest list 21.Numbered list2.Second item1.Sub item2.Another sub item3.Third item

22-13-01-1 Activity

@startuml
start
:You can have horizontal line
----
Or double line
====
Or strong line
____
Or dotted line
..My title..
Or dotted title
//and title... //
==Title==
Or double-line title
--Another title--
Or single-line title
Enjoy!;
stop
@enduml

You can have horizontal lineOr double lineOr strong line____Or dotted lineMy titleOr dotted titleand title...TitleOr double-line titleAnother titleOr single-line titleEnjoy!

22-13-02-1 Class

@startuml

class a {
  You can have horizontal line
  ----
  Or double line
  ====
  Or strong line
  ____
  Or dotted line
  ..My title..
  Or dotted title
  //and title... //
  ==Title==
  Or double-line title
  --Another title--
  Or single-line title
  Enjoy!
}

a -- b

@enduml

aYou can have horizontal lineOr double lineOr strong lineOr dotted lineOr dotted titleand title...My titleOr double-line titleTitleOr single-line titleEnjoy!Another titleb

22-13-03-1 Component-Deployment-Use-Case

@startuml
node n [
You can have horizontal line
----
Or double line
====
Or strong line
____
Or dotted line
..My title..
//and title... //
==Title==
--Another title--
Enjoy!
]

file f as "
You can have horizontal line
----
Or double line
====
Or strong line
____
Or dotted line
..My title..
//and title... //
==Title==
--Another title--
Enjoy!
"

person p [

You can have horizontal line
----
Or double line
====
Or strong line
____
Or dotted line
..My title..
//and title... //
==Title==
--Another title--
Enjoy!

]
@enduml

You can have horizontal lineOr double lineOr strong lineOr dotted lineand title...My titleTitleEnjoy!Another titleYou can have horizontal lineOr double lineOr strong lineOr dotted lineand title...My titleTitleEnjoy!Another title You can have horizontal lineOr double lineOr strong lineOr dotted lineand title...My titleTitleEnjoy! Another title

22-13-05-1 Object

@startuml
object user {
  You can have horizontal line
  ----
  Or double line
  ====
  Or strong line
  ____
  Or dotted line
  ..My title..
  //and title... //
  ==Title==
  --Another title--
  Enjoy!
}

@enduml

userYou can have horizontal lineOr double lineOr strong lineOr dotted lineand title...My titleTitleEnjoy!Another title

22-13-06-1 MindMap

@startmindmap

* root
** d1
**:You can have horizontal line
----
Or double line
====
Or strong line
____
Or dotted line
..My title..
//and title... //
==Title==
--Another title--
Enjoy!;

@endmindmap

rootd1You can have horizontal lineOr double lineOr strong line____Or dotted lineMy titleand title...TitleAnother titleEnjoy!

22-13-08-1 Note

@startuml
note as n
  You can have horizontal line
  ----
  Or double line
  ====
  Or strong line
  ____
  Or dotted line
  ..My title..
  //and title... //
  ==Title==
  --Another title--
  Enjoy!
end note
@enduml

You can have horizontal lineOr double lineOr strong lineOr dotted lineand title...My titleTitleEnjoy!Another title

22-14-1 Style-equivalent-between-Creole-and-HTML

@startmindmap
* Style equivalent\n(between Creole and HTML)
**:**Creole**
----
<#silver>|= code|= output|
| \n This is ""~**bold**""\n | \n This is **bold** |
| \n This is ""~//italics//""\n | \n This is //italics// |
| \n This is ""~""monospaced~"" ""\n | \n This is ""monospaced"" |
| \n This is ""~--stroked--""\n | \n This is --stroked-- |
| \n This is ""~__underlined__""\n |  \n This is __underlined__ |
| \n This is ""<U+007E><U+007E>waved<U+007E><U+007E>""\n | \n This is ~~waved~~ |;
**:<b>Legacy HTML like
----
<#silver>|= code|= output|
| \n This is ""~<b>bold</b>""\n | \n This is <b>bold</b> |
| \n This is ""~<i>italics</i>""\n | \n This is <i>italics</i> |
| \n This is ""~<font:monospaced>monospaced</font>""\n | \n This is <font:monospaced>monospaced</font> |
| \n This is ""~<s>stroked</s>""\n | \n  This is <s>stroked</s> |
| \n This is ""~<u>underlined</u>""\n | \n This is <u>underlined</u> |
| \n This is ""~<w>waved</w>""\n | \n This is <w>waved</w> |

And color as a bonus...
<#silver>|= code|= output|
| \n This is ""~<s:""<color:green>""green""</color>"">stroked</s>""\n | \n  This is <s:green>stroked</s> |
| \n This is ""~<u:""<color:red>""red""</color>"">underlined</u>""\n | \n This is <u:red>underlined</u> |
| \n This is ""~<w:""<color:#0000FF>""#0000FF""</color>"">waved</w>""\n | \n This is <w:#0000FF>waved</w> |;
@endmindmap

Style equivalent(between Creole and HTML)Creolecodeoutput This is**bold**  This isbold  This is//italics//  This isitalics  This is""monospaced""  This ismonospaced  This is--stroked--  This isstroked  This is__underlined__   This isunderlined  This is~~waved~~  This iswaved Legacy HTML likecodeoutput This is<b>bold</b>  This isbold  This is<i>italics</i>  This isitalics  This is<font:monospaced>monospaced</font>  This ismonospaced  This is<s>stroked</s>  This isstroked  This is<u>underlined</u>  This isunderlined  This is<w>waved</w>  This iswaved  And color as a bonus...codeoutput This is<s:green>stroked</s>  This isstroked  This is<u:red>underlined</u>  This isunderlined  This is<w:#0000FF>waved</w>  This iswaved 

23-01-1 Changing-colors

@startuml
sprite $foo1 {
FFFFFFFFFFFFFFF
F0123456789ABCF
F0123456789ABCF
F0123456789ABCF
F0123456789ABCF
F0123456789ABCF
F0123456789ABCF
F0123456789ABCF
F0123456789ABCF
FFFFFFFFFFFFFFF
}
Alice -> Bob : Testing <$foo1,scale=3.4,color=orange>
@enduml

AliceAliceBobBobTesting

23-04-1 Examples

@startuml
sprite $printer [15x15/8z] NOtH3W0W208HxFz_kMAhj7lHWpa1XC716sz0Pq4MVPEWfBHIuxP3L6kbTcizR8tAhzaqFvXwvFfPEqm0
start
:click on <$printer> to print the page;
@enduml

click onto print the page

23-04-2 Examples

@startuml
sprite $bug [15x15/16z] PKzR2i0m2BFMi15p__FEjQEqB1z27aeqCqixa8S4OT7C53cKpsHpaYPDJY_12MHM-BLRyywPhrrlw3qumqNThmXgd1TOterAZmOW8sgiJafogofWRwtV3nCF
sprite $printer [15x15/8z] NOtH3W0W208HxFz_kMAhj7lHWpa1XC716sz0Pq4MVPEWfBHIuxP3L6kbTcizR8tAhzaqFvXwvFfPEqm0
sprite $disk {
444445566677881
436000000009991
43600000000ACA1
53700000001A7A1
53700000012B8A1
53800000123B8A1
63800001233C9A1
634999AABBC99B1
744566778899AB1
7456AAAAA99AAB1
8566AFC228AABB1
8567AC8118BBBB1
867BD4433BBBBB1
39AAAAABBBBBBC1
}

title Use of sprites (<$printer>, <$bug>...)

class Example {
  Can have some bug : <$bug>
  Click on <$disk> to save
}

note left : The printer <$printer> is available

@enduml

Use of sprites (,...)ExampleCan have some bug :Click onto saveThe printeris available

23-06-1 Listing-Sprites

@startuml

!define osaPuml https://raw.githubusercontent.com/Crashedmind/PlantUML-opensecurityarchitecture2-icons/master
!include osaPuml/Common.puml
!include osaPuml/User/all.puml

listsprites
@enduml

osa_user_auditosa_user_black_hatosa_user_blueosa_user_blue_security_specialistosa_user_blue_sysadminosa_user_blue_testerosa_user_blue_tieosa_user_greenosa_user_green_architectosa_user_green_business_managerosa_user_green_developerosa_user_green_operationsosa_user_green_project_managerosa_user_green_service_managerosa_user_green_warningosa_user_large_grouposa_user_white_hatosa_users_blue_green

23-1 Defining-and-using-sprites

@startuml
sprite $foo1 {
FFFFFFFFFFFFFFF
F0123456789ABCF
F0123456789ABCF
F0123456789ABCF
F0123456789ABCF
F0123456789ABCF
F0123456789ABCF
F0123456789ABCF
F0123456789ABCF
FFFFFFFFFFFFFFF
}
Alice -> Bob : Testing <$foo1>
@enduml

AliceAliceBobBobTesting

23-2 Defining-and-using-sprites

@startuml
sprite $foo1 {
FFFFFFFFFFFFFFF
F0123456789ABCF
F0123456789ABCF
F0123456789ABCF
F0123456789ABCF
F0123456789ABCF
F0123456789ABCF
F0123456789ABCF
F0123456789ABCF
FFFFFFFFFFFFFFF
}
Alice -> Bob : Testing <$foo1{scale=3}>
@enduml

AliceAliceBobBobTesting

24-03-1 Black-and-White

@startuml

skinparam monochrome true

actor User
participant "First Class" as A
participant "Second Class" as B
participant "Last Class" as C

User -> A: DoWork
activate A

A -> B: Create Request
activate B

B -> C: DoWork
activate C
C --> B: WorkDone
destroy C

B --> A: Request Created
deactivate B

A --> User: Done
deactivate A

@enduml

UserUserFirst ClassFirst ClassSecond ClassSecond ClassLast ClassLast ClassDoWorkCreate RequestDoWorkWorkDoneRequest CreatedDone

24-04-1 Shadowing

@startuml

left to right direction

skinparam shadowing<<no_shadow>> false
skinparam shadowing<<with_shadow>> true

actor User
(Glowing use case) <<with_shadow>> as guc
(Flat use case) <<no_shadow>> as fuc
User -- guc
User -- fuc

@enduml

User«with_shadow»Glowing use case«no_shadow»Flat use case

24-05-1 Reverse-colors

@startuml

skinparam monochrome reverse

actor User
participant "First Class" as A
participant "Second Class" as B
participant "Last Class" as C

User -> A: DoWork
activate A

A -> B: Create Request
activate B

B -> C: DoWork
activate C
C --> B: WorkDone
destroy C

B --> A: Request Created
deactivate B

A --> User: Done
deactivate A

@enduml

UserUserFirst ClassFirst ClassSecond ClassSecond ClassLast ClassLast ClassDoWorkCreate RequestDoWorkWorkDoneRequest CreatedDone

24-06-1 Colors

@startuml
colors
@enduml

APPLICATIONAliceBlueAntiqueWhiteAquaAquamarineAzureBUSINESSBeigeBisqueBlackBlanchedAlmondBlueBlueVioletBrownBurlyWoodCadetBlueChartreuseChocolateCoralCornflowerBlueCornsilkCrimsonCyanDarkBlueDarkCyanDarkGoldenRodDarkGrayDarkGreenDarkGreyDarkKhakiDarkMagentaDarkOliveGreenDarkOrchidDarkRedDarkSalmonDarkSeaGreenDarkSlateBlueDarkSlateGrayDarkSlateGreyDarkTurquoiseDarkVioletDarkorangeDeepPinkDeepSkyBlueDimGrayDimGreyDodgerBlueFireBrickFloralWhiteForestGreenFuchsiaGainsboroGhostWhiteGoldGoldenRodGrayGreenGreenYellowGreyHoneyDewHotPinkIMPLEMENTATIONIndianRedIndigoIvoryKhakiLavenderLavenderBlushLawnGreenLemonChiffonLightBlueLightCoralLightCyanLightGoldenRodYellowLightGrayLightGreenLightGreyLightPinkLightSalmonLightSeaGreenLightSkyBlueLightSlateGrayLightSlateGreyLightSteelBlueLightYellowLimeLimeGreenLinenMOTIVATIONMagentaMaroonMediumAquaMarineMediumBlueMediumOrchidMediumPurpleMediumSeaGreenMediumSlateBlueMediumSpringGreenMediumTurquoiseMediumVioletRedMidnightBlueMintCreamMistyRoseMoccasinNavajoWhiteNavyOldLaceOliveOliveDrabOrangeOrangeRedOrchidPHYSICALPaleGoldenRodPaleGreenPaleTurquoisePaleVioletRedPapayaWhipPeachPuffPeruPinkPlumPowderBluePurpleRedRosyBrownRoyalBlueSTRATEGYSaddleBrownSalmonSandyBrownSeaGreenSeaShellSiennaSilverSkyBlueSlateBlueSlateGraySlateGreySnowSpringGreenSteelBlueTECHNOLOGYTanTealThistleTomatoTurquoiseVioletWheatWhiteWhiteSmokeYellowYellowGreen

24-08-1 Text-Alignment

@startuml
skinparam sequenceMessageAlign center
Alice -> Bob : Hi
Bob -> Alice : This is very long
@enduml

AliceAliceBobBobHiThis is very long

24-08-2 Text-Alignment

@startuml
skinparam sequenceMessageAlign right
Alice -> Bob : Hi
Bob -> Alice : This is very long
@enduml

AliceAliceBobBobHiThis is very long

24-08-3 Text-Alignment

@startuml
skinparam sequenceMessageAlign direction
Alice -> Bob : Hi
Bob -> Alice: Hi
@enduml

AliceAliceBobBobHiHi

24-09-1 Examples

@startuml
skinparam backgroundColor #EEEBDC
skinparam handwritten true

skinparam sequence {
  ArrowColor DeepSkyBlue
  ActorBorderColor DeepSkyBlue
  LifeLineBorderColor blue
  LifeLineBackgroundColor #A9DCDF

  ParticipantBorderColor DeepSkyBlue
  ParticipantBackgroundColor DodgerBlue
  ParticipantFontName Impact
  ParticipantFontSize 17
  ParticipantFontColor #A9DCDF

  ActorBackgroundColor aqua
  ActorFontColor DeepSkyBlue
  ActorFontSize 17
  ActorFontName Aapex
}

actor User
participant "First Class" as A
participant "Second Class" as B
participant "Last Class" as C

User -> A: DoWork
activate A

A -> B: Create Request
activate B

B -> C: DoWork
activate C
C --> B: WorkDone
destroy C

B --> A: Request Created
deactivate B

A --> User: Done
deactivate A
@enduml

UserUserFirst ClassFirst ClassSecond ClassSecond ClassLast ClassLast ClassDoWorkCreate RequestDoWorkWorkDoneRequest CreatedDone

24-09-2 Examples

@startuml
skinparam handwritten true

skinparam actor {
  BorderColor black
  FontName Courier
  BackgroundColor<< Human >> Gold
}

skinparam usecase {
  BackgroundColor DarkSeaGreen
  BorderColor DarkSlateGray

  BackgroundColor<< Main >> YellowGreen
  BorderColor<< Main >> YellowGreen

  ArrowColor Olive
}

User << Human >>
:Main Database: as MySql << Application >>
(Start) << One Shot >>
(Use the application) as (Use) << Main >>

User -> (Start)
User --> (Use)

MySql --> (Use)
@enduml

User«Human»Main Database«Application»«One Shot»Start«Main»Use the application

24-09-3 Examples

@startuml
skinparam roundcorner 20
skinparam class {
  BackgroundColor PaleGreen
  ArrowColor SeaGreen
  BorderColor SpringGreen
}
skinparam stereotypeCBackgroundColor YellowGreen

Class01 "1" *-- "many" Class02 : contains

Class03 o-- Class04 : aggregation
@enduml

Class01Class02Class03Class04contains1manyaggregation

24-09-4 Examples

@startuml
skinparam interface {
  backgroundColor RosyBrown
  borderColor orange
}

skinparam component {
  FontSize 13
  BackgroundColor<<Apache>> LightCoral
  BorderColor<<Apache>> #FF6655
  FontName Courier
  BorderColor black
  BackgroundColor gold
  ArrowFontName Impact
  ArrowColor #FF6655
  ArrowFontColor #777777
}

() "Data Access" as DA
[Web Server] << Apache >>

DA - [First Component]
[First Component] ..> () HTTP : use
HTTP - [Web Server]
@enduml

Data Access«Apache»Web ServerFirst ComponentHTTPuse

24-09-5 Examples

@startuml
[AA] <<static lib>>
[BB] <<shared lib>>
[CC] <<static lib>>

node node1
node node2 <<shared node>>
database Production

skinparam component {
  backgroundColor<<static lib>> DarkKhaki
  backgroundColor<<shared lib>> Green
}

skinparam node {
  borderColor Green
  backgroundColor Yellow
  backgroundColor<<shared node>> Magenta
}
skinparam databaseBackgroundColor Aqua
@enduml

«static lib»AA«shared lib»BB«static lib»CCnode1«shared node»node2Production

24-10-1 List-of-all-skinparam-parameters

@startuml
skinparameters
@enduml

ActivityBackgroundColorActivityBorderColorActivityBorderThicknessActivityDiamondFontColorActivityDiamondFontNameActivityDiamondFontSizeActivityDiamondFontStyleActivityFontColorActivityFontNameActivityFontSizeActivityFontStyleActorBackgroundColorActorBorderColorActorFontColorActorFontNameActorFontSizeActorFontStyleActorStereotypeFontColorActorStereotypeFontNameActorStereotypeFontSizeActorStereotypeFontStyleAgentBorderThicknessAgentFontColorAgentFontNameAgentFontSizeAgentFontStyleAgentStereotypeFontColorAgentStereotypeFontNameAgentStereotypeFontSizeAgentStereotypeFontStyleArchimateBorderThicknessArchimateFontColorArchimateFontNameArchimateFontSizeArchimateFontStyleArchimateStereotypeFontColorArchimateStereotypeFontNameArchimateStereotypeFontSizeArchimateStereotypeFontStyleArrowFontColorArrowFontNameArrowFontSizeArrowFontStyleArrowHeadColorArrowLollipopColorArrowMessageAlignmentArrowThicknessArtifactFontColorArtifactFontNameArtifactFontSizeArtifactFontStyleArtifactStereotypeFontColorArtifactStereotypeFontNameArtifactStereotypeFontSizeArtifactStereotypeFontStyleBackgroundColorBiddableBackgroundColorBiddableBorderColorBoundaryFontColorBoundaryFontNameBoundaryFontSizeBoundaryFontStyleBoundaryStereotypeFontColorBoundaryStereotypeFontNameBoundaryStereotypeFontSizeBoundaryStereotypeFontStyleBoxPaddingCaptionFontColorCaptionFontNameCaptionFontSizeCaptionFontStyleCardBorderThicknessCardFontColorCardFontNameCardFontSizeCardFontStyleCardStereotypeFontColorCardStereotypeFontNameCardStereotypeFontSizeCardStereotypeFontStyleCircledCharacterFontColorCircledCharacterFontNameCircledCharacterFontSizeCircledCharacterFontStyleCircledCharacterRadiusClassAttributeFontColorClassAttributeFontNameClassAttributeFontSizeClassAttributeFontStyleClassAttributeIconSizeClassBackgroundColorClassBorderColorClassBorderThicknessClassFontColorClassFontNameClassFontSizeClassFontStyleClassStereotypeFontColorClassStereotypeFontNameClassStereotypeFontSizeClassStereotypeFontStyleCloudFontColorCloudFontNameCloudFontSizeCloudFontStyleCloudStereotypeFontColorCloudStereotypeFontNameCloudStereotypeFontSizeCloudStereotypeFontStyleColorArrowSeparationSpaceComponentBorderThicknessComponentFontColorComponentFontNameComponentFontSizeComponentFontStyleComponentStereotypeFontColorComponentStereotypeFontNameComponentStereotypeFontSizeComponentStereotypeFontStyleComponentStyleConditionEndStyleConditionStyleControlFontColorControlFontNameControlFontSizeControlFontStyleControlStereotypeFontColorControlStereotypeFontNameControlStereotypeFontSizeControlStereotypeFontStyleDatabaseFontColorDatabaseFontNameDatabaseFontSizeDatabaseFontStyleDatabaseStereotypeFontColorDatabaseStereotypeFontNameDatabaseStereotypeFontSizeDatabaseStereotypeFontStyleDefaultFontColorDefaultFontNameDefaultFontSizeDefaultFontStyleDefaultMonospacedFontNameDefaultTextAlignmentDesignedBackgroundColorDesignedBorderColorDesignedDomainBorderThicknessDesignedDomainFontColorDesignedDomainFontNameDesignedDomainFontSizeDesignedDomainFontStyleDesignedDomainStereotypeFontColorDesignedDomainStereotypeFontNameDesignedDomainStereotypeFontSizeDesignedDomainStereotypeFontStyleDiagramBorderColorDiagramBorderThicknessDomainBackgroundColorDomainBorderColorDomainBorderThicknessDomainFontColorDomainFontNameDomainFontSizeDomainFontStyleDomainStereotypeFontColorDomainStereotypeFontNameDomainStereotypeFontSizeDomainStereotypeFontStyleDpiEntityFontColorEntityFontNameEntityFontSizeEntityFontStyleEntityStereotypeFontColorEntityStereotypeFontNameEntityStereotypeFontSizeEntityStereotypeFontStyleFileFontColorFileFontNameFileFontSizeFileFontStyleFileStereotypeFontColorFileStereotypeFontNameFileStereotypeFontSizeFileStereotypeFontStyleFixCircleLabelOverlappingFolderFontColorFolderFontNameFolderFontSizeFolderFontStyleFolderStereotypeFontColorFolderStereotypeFontNameFolderStereotypeFontSizeFolderStereotypeFontStyleFooterFontColorFooterFontNameFooterFontSizeFooterFontStyleFrameFontColorFrameFontNameFrameFontSizeFrameFontStyleFrameStereotypeFontColorFrameStereotypeFontNameFrameStereotypeFontSizeFrameStereotypeFontStyleGenericDisplayGuillemetHandwrittenHeaderFontColorHeaderFontNameHeaderFontSizeHeaderFontStyleHexagonBorderThicknessHexagonFontColorHexagonFontNameHexagonFontSizeHexagonFontStyleHexagonStereotypeFontColorHexagonStereotypeFontNameHexagonStereotypeFontSizeHexagonStereotypeFontStyleHyperlinkColorHyperlinkUnderlineIconIEMandatoryColorIconPackageBackgroundColorIconPackageColorIconPrivateBackgroundColorIconPrivateColorIconProtectedBackgroundColorIconProtectedColorIconPublicBackgroundColorIconPublicColorInterfaceFontColorInterfaceFontNameInterfaceFontSizeInterfaceFontStyleInterfaceStereotypeFontColorInterfaceStereotypeFontNameInterfaceStereotypeFontSizeInterfaceStereotypeFontStyleLabelFontColorLabelFontNameLabelFontSizeLabelFontStyleLabelStereotypeFontColorLabelStereotypeFontNameLabelStereotypeFontSizeLabelStereotypeFontStyleLegendBorderThicknessLegendFontColorLegendFontNameLegendFontSizeLegendFontStyleLexicalBackgroundColorLexicalBorderColorLifelineStrategyLinetypeMachineBackgroundColorMachineBorderColorMachineBorderThicknessMachineFontColorMachineFontNameMachineFontSizeMachineFontStyleMachineStereotypeFontColorMachineStereotypeFontNameMachineStereotypeFontSizeMachineStereotypeFontStyleMaxAsciiMessageLengthMaxMessageSizeMinClassWidthMonochromeNodeFontColorNodeFontNameNodeFontSizeNodeFontStyleNodeStereotypeFontColorNodeStereotypeFontNameNodeStereotypeFontSizeNodeStereotypeFontStyleNodesepNoteBackgroundColorNoteBorderColorNoteBorderThicknessNoteFontColorNoteFontNameNoteFontSizeNoteFontStyleNoteShadowingNoteTextAlignmentObjectAttributeFontColorObjectAttributeFontNameObjectAttributeFontSizeObjectAttributeFontStyleObjectBorderThicknessObjectFontColorObjectFontNameObjectFontSizeObjectFontStyleObjectStereotypeFontColorObjectStereotypeFontNameObjectStereotypeFontSizeObjectStereotypeFontStylePackageBorderThicknessPackageFontColorPackageFontNamePackageFontSizePackageFontStylePackageStereotypeFontColorPackageStereotypeFontNamePackageStereotypeFontSizePackageStereotypeFontStylePackageStylePackageTitleAlignmentPaddingPageBorderColorPageExternalColorPageMarginParticipantFontColorParticipantFontNameParticipantFontSizeParticipantFontStyleParticipantPaddingParticipantStereotypeFontColorParticipantStereotypeFontNameParticipantStereotypeFontSizeParticipantStereotypeFontStylePartitionBorderThicknessPartitionFontColorPartitionFontNamePartitionFontSizePartitionFontStylePathHoverColorPersonBorderThicknessPersonFontColorPersonFontNamePersonFontSizePersonFontStylePersonStereotypeFontColorPersonStereotypeFontNamePersonStereotypeFontSizePersonStereotypeFontStyleQueueBorderThicknessQueueFontColorQueueFontNameQueueFontSizeQueueFontStyleQueueStereotypeFontColorQueueStereotypeFontNameQueueStereotypeFontSizeQueueStereotypeFontStyleRanksepRectangleBorderThicknessRectangleFontColorRectangleFontNameRectangleFontSizeRectangleFontStyleRectangleStereotypeFontColorRectangleStereotypeFontNameRectangleStereotypeFontSizeRectangleStereotypeFontStyleRequirementBackgroundColorRequirementBorderColorRequirementBorderThicknessRequirementFontColorRequirementFontNameRequirementFontSizeRequirementFontStyleRequirementStereotypeFontColorRequirementStereotypeFontNameRequirementStereotypeFontSizeRequirementStereotypeFontStyleResponseMessageBelowArrowRoundCornerSameClassWidthSequenceActorBorderThicknessSequenceArrowThicknessSequenceBoxBorderColorSequenceBoxFontColorSequenceBoxFontNameSequenceBoxFontSizeSequenceBoxFontStyleSequenceDelayFontColorSequenceDelayFontNameSequenceDelayFontSizeSequenceDelayFontStyleSequenceDividerBorderThicknessSequenceDividerFontColorSequenceDividerFontNameSequenceDividerFontSizeSequenceDividerFontStyleSequenceGroupBodyBackgroundColorSequenceGroupBorderThicknessSequenceGroupFontColorSequenceGroupFontNameSequenceGroupFontSizeSequenceGroupFontStyleSequenceGroupHeaderFontColorSequenceGroupHeaderFontNameSequenceGroupHeaderFontSizeSequenceGroupHeaderFontStyleSequenceLifeLineBorderColorSequenceLifeLineBorderThicknessSequenceMessageAlignmentSequenceMessageTextAlignmentSequenceNewpageSeparatorColorSequenceParticipantSequenceParticipantBorderThicknessSequenceReferenceAlignmentSequenceReferenceBackgroundColorSequenceReferenceBorderThicknessSequenceReferenceFontColorSequenceReferenceFontNameSequenceReferenceFontSizeSequenceReferenceFontStyleSequenceReferenceHeaderBackgroundColorSequenceStereotypeFontColorSequenceStereotypeFontNameSequenceStereotypeFontSizeSequenceStereotypeFontStyleShadowingStackFontColorStackFontNameStackFontSizeStackFontStyleStackStereotypeFontColorStackStereotypeFontNameStackStereotypeFontSizeStackStereotypeFontStyleStateAttributeFontColorStateAttributeFontNameStateAttributeFontSizeStateAttributeFontStyleStateBorderColorStateFontColorStateFontNameStateFontSizeStateFontStyleStateMessageAlignmentStereotypePositionStorageFontColorStorageFontNameStorageFontSizeStorageFontStyleStorageStereotypeFontColorStorageStereotypeFontNameStorageStereotypeFontSizeStorageStereotypeFontStyleStyleSvglinkTargetSwimlaneBorderThicknessSwimlaneTitleFontColorSwimlaneTitleFontNameSwimlaneTitleFontSizeSwimlaneTitleFontStyleSwimlaneWidthSwimlaneWrapTitleWidthTabSizeTimingFontColorTimingFontNameTimingFontSizeTimingFontStyleTitleBorderRoundCornerTitleBorderThicknessTitleFontColorTitleFontNameTitleFontSizeTitleFontStyleUsecaseBorderThicknessUsecaseFontColorUsecaseFontNameUsecaseFontSizeUsecaseFontStyleUsecaseStereotypeFontColorUsecaseStereotypeFontNameUsecaseStereotypeFontSizeUsecaseStereotypeFontStyleWrapWidth

25-02-1 Variable-definition

@startuml
!$ab = "foo1"
!$cd = "foo2"
!$ef = $ab + $cd
Alice -> Bob : $ab
Alice -> Bob : $cd
Alice -> Bob : $ef
@enduml
AliceAliceBobBobfoo1foo2foo1foo2

25-04-1 Conditions

@startuml
!$a = 10
!$ijk = "foo"
Alice -> Bob : A
!if ($ijk == "foo") && ($a+10>=4)
Alice -> Bob : yes
!else
Alice -> Bob : This should not appear
!endif
Alice -> Bob : B
@enduml

AliceAliceBobBobAyesB

25-05-1 While-loop

@startuml
!procedure $foo($arg)
:procedure start;
!while $arg!=0
!$i=3
#palegreen:arg=$arg;
!while $i!=0
:arg=$arg and i=$i;
!$i = $i - 1
!endwhile
!$arg = $arg - 1
!endwhile
:procedure end;
!endprocedure

start
$foo(2)
end
@enduml

procedure startarg=2arg=2 and i=3arg=2 and i=2arg=2 and i=1arg=1arg=1 and i=3arg=1 and i=2arg=1 and i=1procedure end

25-05-2 While-loop

@startmindmap
!procedure $foo($arg)
  !while $arg!=0
    !$i=3
    **[#palegreen] arg = $arg
    !while $i!=0
      *** i = $i
      !$i = $i - 1
    !endwhile
    !$arg = $arg - 1
  !endwhile
!endprocedure

*:While
Loop;
$foo(2)
@endmindmap

WhileLooparg = 2i = 3i = 2i = 1arg = 1i = 3i = 2i = 1

25-06-1 Procedure

@startuml
!procedure $msg($source, $destination)
$source --> $destination
!endprocedure

!procedure $init_class($name)
class $name {
  $addCommonMethod()
}
!endprocedure


!procedure $addCommonMethod()
toString()
hashCode()
!endprocedure


$init_class("foo1")
$init_class("foo2")
$msg("foo1", "foo2")
@enduml

foo1toString()hashCode()foo2toString()hashCode()

25-07-1 Return-function

@startuml
!function $double($a)
!return $a + $a
!endfunction

Alice -> Bob : The double of 3 is $double(3)
@enduml

AliceAliceBobBobThe double of 3 is 6

25-07-2 Return-function

@startuml
!function $double($a) !return $a + $a

Alice -> Bob : The double of 3 is $double(3)
Alice -> Bob : $double("This work also for strings.")
@enduml

AliceAliceBobBobThe double of 3 is 6This work also for strings.This work also for strings.

25-07-3 Return-function

@startuml
!function $dummy()
!local $ijk = "local"
!return "Alice -> Bob : " + $ijk
!endfunction

!global $ijk = "foo"

Alice -> Bob : $ijk
$dummy()
Alice -> Bob : $ijk
@enduml

AliceAliceBobBobfoolocalfoo

25-08-1 Default-argument-value

@startuml
!function $inc($value, $step=1)
!return $value + $step
!endfunction

Alice -> Bob : Just one more $inc(3)
Alice -> Bob : Add two to three : $inc(3, 2)
@enduml

AliceAliceBobBobJust one more 4Add two to three : 5

25-08-2 Default-argument-value

@startuml
!procedure defaulttest($x, $y="DefaultY", $z="DefaultZ")
note over Alice
  x = $x
  y = $y
  z = $z
end note
!endprocedure

defaulttest(1, 2, 3)
defaulttest(1, 2)
defaulttest(1)
@enduml

AliceAlicex = 1y = 2z = 3x = 1y = 2z = DefaultZx = 1y = DefaultYz = DefaultZ

25-09-1 Unquoted-procedure-or-function

@startuml
!unquoted function id($text1, $text2="FOO") !return $text1 + $text2

alice -> bob : id(aa)
alice -> bob : id(ab,cd)
@enduml

alicealicebobbobaaFOOabcd

25-10-1 Keywords-arguments

@startuml

!unquoted procedure $element($alias, $description="", $label="", $technology="", $size=12, $colour="green")
rectangle $alias as "
<color:$colour><<$alias>></color>
==$label==
//<size:$size>[$technology]</size>//

$description"
!endprocedure

$element(myalias, "This description is %newline()on several lines", $size=10, $technology="Java")
@enduml

«myalias»[Java] This description ison several lines

25-11-1 Including-files-or-URL

@startuml

interface List
List : int size()
List : void clear()
List <|.. ArrayList
@enduml

Listint size()void clear()ArrayList

25-14-1 Logging

@startuml
!function bold($text)
!$result = "<b>"+ $text +"</b>"
!log Calling bold function with $text. The result is $result
!return $result
!endfunction

Alice -> Bob : This is bold("bold")
Alice -> Bob : This is bold("a second call")
@enduml

AliceAliceBobBobThis isboldThis isa second call

25-15-1 Memory-dump

@startuml
!function $inc($string)
!$val = %intval($string)
!log value is $val
!dump_memory
!return $val+1
!endfunction

Alice -> Bob : 4 $inc("3")
!unused = "foo"
!dump_memory EOF
@enduml

AliceAliceBobBob4 4

25-16-1 Assertion

@startuml
Alice -> Bob : Hello
!assert %strpos("abcdef", "cd")==3 : "This always fails"
@enduml

Add your own dedication into PlantUML For just $5 per month!Details onhttps://plantuml.com/dedicationWelcome to PlantUML! You can start with a simple UML Diagram like: Bob->Alice: Hello Or class Example You will find more information about PlantUML syntax onhttps://plantuml.com (Details by typinglicensekeyword) PlantUML 1.2024.6[From reference_25-16-1_Assertion.uml (line 3) ] @startumlAlice -> Bob : Hello!assert %strpos("abcdef", "cd")==3 : "This always fails"Assertion error : This always fails

25-19-1 Argument-concatenation

@startuml
!unquoted procedure COMP_TEXTGENCOMP(name)
[name] << Comp >>
interface Ifc << IfcType >> AS name##Ifc
name##Ifc - [name]
!endprocedure
COMP_TEXTGENCOMP(dummy)
@enduml

«Comp»dummyIfc«IfcType»

25-20-1 Dynamic-invocation

@startuml
!procedure $go()
Bob -> Alice : hello
!endprocedure

!$wrapper = "$go"

%invoke_procedure($wrapper)
@enduml

BobBobAliceAlicehello

25-20-2 Dynamic-invocation

@startuml
!procedure $go($txt)
Bob -> Alice : $txt
!endprocedure

%invoke_procedure("$go", "hello from Bob...")
@enduml

BobBobAliceAlicehello from Bob...

25-20-3 Dynamic-invocation

@startuml
!function bold($text)
!return "<b>"+ $text +"</b>"
!endfunction

Alice -> Bob : %call_user_func("bold", "Hello") there
@enduml

AliceAliceBobBobHellothere

25-21-1 Evaluation-of-addition-depending-of-data-types

@startuml
title
  <#LightBlue>|= |=  $a |=  $b |=  <U+0025>string($a + $b)|
  <#LightGray>| type | str | str | str (concatenation) |
  | example |= "a" |= "b" |= %string("a" + "b") |
  <#LightGray>| type | str | int | str (concatenation) |
  | ex.|= "a" |=  2  |= %string("a" + 2)   |
  <#LightGray>| type | str | int | str (concatenation) |
  | ex.|=  1  |= "b" |= %string(1 + "b")   |
  <#LightGray>| type | bool | str | str (concatenation) |
  | ex.|= <U+0025>true() |= "b" |= %string(%true() + "b") |
  <#LightGray>| type | str | bool | str (concatenation) |
  | ex.|= "a" |= <U+0025>false() |= %string("a" + %false()) |
  <#LightGray>| type |  int  |  int | int (addition of int) |
  | ex.|=  1  |=  2  |= %string(1 + 2)     |
  <#LightGray>| type |  bool  |  int | int (addition) |
  | ex.|= <U+0025>true() |= 2 |= %string(%true() + 2) |
  <#LightGray>| type |  int  |  bool | int (addition) |
  | ex.|=  1  |= <U+0025>false() |= %string(1 + %false()) |
  <#LightGray>| type |  int  |  int | int (addition) |
  | ex.|=  1  |=  <U+0025>intval("2")  |= %string(1 + %intval("2")) |
end title
@enduml

 $a$b%string($a + $b)typestrstrstr (concatenation)example"a""b"abtypestrintstr (concatenation)ex."a"2a2typestrintstr (concatenation)ex.1"b"1btypeboolstrstr (concatenation)ex.%true()"b"1btypestrboolstr (concatenation)ex."a"%false()a0typeintintint (addition of int)ex.123typeboolintint (addition)ex.%true()23typeintboolint (addition)ex.1%false()1typeintintint (addition)ex.1%intval("2")3

26-01-1 Examples

@startuml
skinparam handwritten true
skinparam backgroundColor #EEEBDC

actor 使用者
participant "頭等艙" as A
participant "第二類" as B
participant "最後一堂課" as 別的東西

使用者 -> A: 完成這項工作
activate A

A -> B: 創建請求
activate B

B -> 別的東西: 創建請求
activate 別的東西
別的東西 --> B: 這項工作完成
destroy 別的東西

B --> A: 請求創建
deactivate B

A --> 使用者: 做完
deactivate A
@enduml

使用者使用者頭等艙頭等艙第二類第二類最後一堂課最後一堂課完成這項工作創建請求創建請求這項工作完成請求創建做完

26-01-2 Examples

@startuml

(*) --> "膩平台"
--> === S1 ===
--> 鞠躬向公眾
--> === S2 ===
--> 這傢伙波武器
--> (*)

skinparam backgroundColor #AAFFFF
skinparam activityStartColor red
skinparam activityBarColor SaddleBrown
skinparam activityEndColor Silver
skinparam activityBackgroundColor Peru
skinparam activityBorderColor Peru
@enduml

膩平台鞠躬向公眾這傢伙波武器

26-01-3 Examples

@startuml

skinparam usecaseBackgroundColor DarkSeaGreen
skinparam usecaseArrowColor Olive
skinparam actorBorderColor black
skinparam usecaseBorderColor DarkSlateGray

使用者 << 人類 >>
"主數據庫" as 數據庫 << 應用程式 >>
(草創) << 一桿 >>
"主数据燕" as (贏余) << 基本的 >>

使用者 -> (草創)
使用者 --> (贏余)

數據庫  --> (贏余)
@enduml

使用者«人類»主數據庫«應用程式»«一桿»草創«基本的»主数据燕

26-01-4 Examples

@startuml
() "Σωκράτης\nείναι ψεύτης" as Σωκράτης

Σωκράτης - [Πτηνά πολεμοχαρής]
[Πτηνά πολεμοχαρής] ..> () Αθήνα : Αυτές οι φράσεις\nδεν σημαίνουν τίποτα
@enduml

Σωκράτηςείναι ψεύτηςΠτηνά πολεμοχαρήςΑθήναΑυτές οι φράσειςδεν σημαίνουν τίποτα

27-01-1 List-of-Standard-Library

@startuml
stdlib
@enduml

archimateVersion 1.1.0Delivered by https://github.com/plantuml-stdlib/Archimate-PlantUML awsVersion 18.02.22Delivered by https://github.com/milo-minderbinder/AWS-PlantUML awslibVersion 14.0.0Delivered by https://github.com/awslabs/aws-icons-for-plantuml azureVersion 2.2.0Delivered by https://github.com/plantuml-stdlib/Azure-PlantUML c4Version 2.10.0Delivered by https://github.com/plantuml-stdlib/C4-PlantUML classyVersion 1.0.2Delivered by https://github.com/james-gadrow-kr/classy-plantuml classy-c4Version 1.0.3Delivered by https://github.com/james-gadrow-kr/classy-c4 cloudinsightVersion 1.0.0Delivered by https://github.com/plantuml-stdlib/cicon-plantuml-sprites cloudoguVersion 1.0.2Delivered by https://github.com/cloudogu/plantuml-cloudogu-sprites domainstoryVersion 0.3Delivered by https://github.com/johthor/DomainStory-PlantUML edgyVersion 0.8.0Delivered by https://github.com/boessu/plantuml-stdlib eipVersion 1.0.0Delivered by https://github.com/plantuml-stdlib/EIP-PlantUML elasticVersion 0.0.1Delivered by https://github.com/Crashedmind/PlantUML-Elastic-icons gcpVersion 6.0.0Delivered by https://github.com/Crashedmind/PlantUML-icons-GCP k8sVersion 1.0.0Delivered by https://github.com/dcasati/kubernetes-PlantUML kubernetesVersion 5.3.45Delivered by https://github.com/plantuml-stdlib/plantuml-kubernetes-sprites logosVersion 1.1.0Delivered by https://github.com/plantuml-stdlib/gilbarbara-plantuml-sprites materialVersion 0.0.1Delivered by https://github.com/Templarian/MaterialDesign officeVersion 1.0.0Delivered by https://github.com/Roemer/plantuml-office osaVersion 0.0.1Delivered by https://github.com/Crashedmind/PlantUML-opensecurityarchitecture-icons osa2Version 0.0.1Delivered by https://github.com/Crashedmind/PlantUML-opensecurityarchitecture2-icons tupadr3Version 3.0.0Delivered by https://github.com/tupadr3/plantuml-icon-font-sprites  

27-02-1 ArchiMate

@startuml
!include <archimate/Archimate>

title Archimate Sample - Internet Browser

' Elements
Business_Object(businessObject, "A Business Object")
Business_Process(someBusinessProcess,"Some Business Process")
Business_Service(itSupportService, "IT Support for Business (Application Service)")

Application_DataObject(dataObject, "Web Page Data \n 'on the fly'")
Application_Function(webpageBehaviour, "Web page behaviour")
Application_Component(ActivePartWebPage, "Active Part of the web page \n 'on the fly'")

Technology_Artifact(inMemoryItem,"in memory / 'on the fly' html/javascript")
Technology_Service(internetBrowser, "Internet Browser Generic & Plugin")
Technology_Service(internetBrowserPlugin, "Some Internet Browser Plugin")
Technology_Service(webServer, "Some web server")

'Relationships
Rel_Flow_Left(someBusinessProcess, businessObject, "")
Rel_Serving_Up(itSupportService, someBusinessProcess, "")
Rel_Specialization_Up(webpageBehaviour, itSupportService, "")
Rel_Flow_Right(dataObject, webpageBehaviour, "")
Rel_Specialization_Up(dataObject, businessObject, "")
Rel_Assignment_Left(ActivePartWebPage, webpageBehaviour, "")
Rel_Specialization_Up(inMemoryItem, dataObject, "")
Rel_Realization_Up(inMemoryItem, ActivePartWebPage, "")
Rel_Specialization_Right(inMemoryItem,internetBrowser, "")
Rel_Serving_Up(internetBrowser, webpageBehaviour, "")
Rel_Serving_Up(internetBrowserPlugin, webpageBehaviour, "")
Rel_Aggregation_Right(internetBrowser, internetBrowserPlugin, "")
Rel_Access_Up(webServer, inMemoryItem, "")
Rel_Serving_Up(webServer, internetBrowser, "")
@enduml

Archimate Sample - Internet Browser A Business ObjectSome Business ProcessIT Support for Business (Application Service) Web Page Data 'on the fly'Web page behaviourActive Part of the web page 'on the fly' in memory / 'on the fly' html/javascriptInternet Browser Generic & PluginSome Internet Browser PluginSome web server              

27-03-1 AWS-library

@startuml
!include <aws/common>
!include <aws/Storage/AmazonS3/AmazonS3>
AMAZONS3(s3_internal)
AMAZONS3(s3_partner,"Vendor's S3")
s3_internal <- s3_partner
@enduml
«AmazonS3»«AmazonS3»Vendor's S3

27-03-2 AWS-library

@startuml
!include <aws/common>
!include <aws/Storage/AmazonS3/AmazonS3>
!include <aws/Storage/AmazonS3/AmazonS3_LARGE>
skinparam nodeBackgroundColor White
skinparam storage<<**AmazonS3**>> {
  backgroundColor #F9DFDC
}
AMAZONS3(s3_internal,"Default S3")
AMAZONS3(s3_internal2,"S3 as node",node)
AMAZONS3_LARGE(s3_partner,"Large S3")
s3_internal2 <-r- s3_partner
s3_internal <-l- s3_partner
@enduml
«AmazonS3»Default S3«AmazonS3»S3 as node«AmazonS3»Large S3

27-04-1 Amazon-Labs-AWS-Library

@startuml
!include <awslib/AWSCommon>
!include <awslib/InternetOfThings/IoTRule>
!include <awslib/Analytics/KinesisDataStreams>
!include <awslib/ApplicationIntegration/SimpleQueueService>

left to right direction

agent "Published Event" as event #fff

IoTRule(iotRule, "Action Error Rule", "error if Kinesis fails")
KinesisDataStreams(eventStream, "IoT Events", "2 shards")
SimpleQueueService(errorQueue, "Rule Error Queue", "failed Rule actions")

event --> iotRule : JSON message
iotRule --> eventStream : messages
iotRule --> errorQueue : Failed action message
@enduml
Published Event«IoTRule»Action Error Rule[error if Kinesis fails]«KinesisDataStreams»IoT Events[2 shards]«SimpleQueueService»Rule Error Queue[failed Rule actions]JSON messagemessagesFailed action message

27-05-1 Azure-library

@startuml
!include <azure/AzureCommon>
!include <azure/Analytics/AzureEventHub>
!include <azure/Analytics/AzureStreamAnalyticsJob>
!include <azure/Databases/AzureCosmosDb>

left to right direction

agent "Device Simulator" as devices #fff

AzureEventHub(fareDataEventHub, "Fare Data", "PK: Medallion HackLicense VendorId; 3 TUs")
AzureEventHub(tripDataEventHub, "Trip Data", "PK: Medallion HackLicense VendorId; 3 TUs")
AzureStreamAnalyticsJob(streamAnalytics, "Stream Processing", "6 SUs")
AzureCosmosDb(outputCosmosDb, "Output Database", "1,000 RUs")

devices --> fareDataEventHub
devices --> tripDataEventHub
fareDataEventHub --> streamAnalytics
tripDataEventHub --> streamAnalytics
streamAnalytics --> outputCosmosDb
@enduml
Device Simulator«AzureEventHub»Fare Data[PK: Medallion HackLicenseVendorId; 3 TUs]«AzureEventHub»Trip Data[PK: Medallion HackLicenseVendorId; 3 TUs]«AzureStreamAnalyticsJob»Stream Processing[6 SUs]«AzureCosmosDb»Output Database[1,000 RUs]

27-06-1 C4-library

@startuml
!include <C4/C4_Container>
Person(personAlias, "Label", "Optional Description")
Container(containerAlias, "Label", "Technology", "Optional Description")
System(systemAlias, "Label", "Optional Description")
Rel(personAlias, containerAlias, "Label", "Optional Technology")
@enduml
«person»Label Optional Description«container»Label[Technology] Optional Description«system»Label Optional DescriptionLabel[Optional Technology]

27-07-1 Cloud-Insight

@startuml
!include <cloudinsight/tomcat>
!include <cloudinsight/kafka>
!include <cloudinsight/java>
!include <cloudinsight/cassandra>

title Cloudinsight sprites example

skinparam monochrome true

rectangle "<$tomcat>\nwebapp" as webapp
queue "<$kafka>" as kafka
rectangle "<$java>\ndaemon" as daemon
database "<$cassandra>" as cassandra

webapp -> kafka
kafka -> daemon
daemon --> cassandra
@enduml

Cloudinsight sprites examplewebappdaemon

27-08-1 Cloudogu

@startuml
!include <cloudogu/common>
!include <cloudogu/dogus/jenkins>
!include <cloudogu/dogus/cloudogu>
!include <cloudogu/dogus/scm>
!include <cloudogu/dogus/smeagol>
!include <cloudogu/dogus/nexus>
!include <cloudogu/tools/k8s>

node "Cloudogu Ecosystem" <<$cloudogu>> {
  DOGU_JENKINS(jenkins, Jenkins) #ffffff
  DOGU_SCM(scm, SCM-Manager) #ffffff
  DOGU_SMEAGOL(smeagol, Smeagol) #ffffff
  DOGU_NEXUS(nexus,Nexus) #ffffff
}

TOOL_K8S(k8s, Kubernetes) #ffffff

actor developer

developer --> smeagol : "Edit Slides"
smeagol -> scm : Push
scm -> jenkins : Trigger
jenkins -> nexus : Deploy
jenkins --> k8s : Deploy
@enduml

Cloudogu EcosystemJenkinsSCM-ManagerSmeagolNexusKubernetesdeveloperEdit SlidesPushTriggerDeployDeploy

27-09-1 Elastic-library

@startuml
!include <elastic/common>
!include <elastic/elasticsearch/elasticsearch>
!include <elastic/logstash/logstash>
!include <elastic/kibana/kibana>

ELASTICSEARCH(ElasticSearch, "Search and Analyze",database)
LOGSTASH(Logstash, "Parse and Transform",node)
KIBANA(Kibana, "Visualize",agent)

Logstash -right-> ElasticSearch: Transformed Data
ElasticSearch -right-> Kibana: Data to View
@enduml

«elasticsearch»Search and Analyze«logstash»Parse and Transform«kibana»VisualizeTransformed DataData to View

27-09-2 Elastic-library

@startuml
'Adapted from https://github.com/Crashedmind/PlantUML-Elastic-icons/blob/master/All.puml

'Elastic stuff here
'================================

!include <elastic/common>
!include <elastic/apm/apm>
!include <elastic/app_search/app_search>
!include <elastic/beats/beats>
!include <elastic/cloud/cloud>
!include <elastic/cloud_in_kubernetes/cloud_in_kubernetes>
!include <elastic/code_search/code_search>
!include <elastic/ece/ece>
!include <elastic/eck/eck>
' Beware of the difference between Crashedmind and plantuml-stdlib version: with '_' usage!
!include <elastic/elasticsearch/elasticsearch>
!include <elastic/endpoint/endpoint>
!include <elastic/enterprise_search/enterprise_search>
!include <elastic/kibana/kibana>
!include <elastic/logging/logging>
!include <elastic/logstash/logstash>
!include <elastic/maps/maps>
!include <elastic/metrics/metrics>
!include <elastic/siem/siem>
!include <elastic/site_search/site_search>
!include <elastic/stack/stack>
!include <elastic/uptime/uptime>

skinparam agentBackgroundColor White

APM(apm)
APP_SEARCH(app_search)
BEATS(beats)
CLOUD(cloud)
CLOUD_IN_KUBERNETES(cloud_in_kubernetes)
CODE_SEARCH(code_search)
ECE(ece)
ECK(eck)
ELASTICSEARCH(elastic_search)
ENDPOINT(endpoint)
ENTERPRISE_SEARCH(enterprise_search)
KIBANA(kibana)
LOGGING(logging)
LOGSTASH(logstash)
MAPS(maps)
METRICS(metrics)
SIEM(siem)
SITE_SEARCH(site_search)
STACK(stack)
UPTIME(uptime)
@enduml

«apm»«app search»«beats»«cloud»«cloud in kubernetes»«code search»«ece»«eck»«elasticsearch»«endpoint»«enterprise search»«kibana»«logging»«logstash»«maps»«metrics»«siem»«site search»«stack»«uptime»

27-10-1 Google-Material-Icons

@startuml
!include <material/common>
' To import the sprite file you DON'T need to place a prefix!
!include <material/folder_move>

MA_FOLDER_MOVE(Red, 1, dir, rectangle, "A label")
@enduml

«MA FOLDER_MOVE»A label

27-10-2 Google-Material-Icons

@startuml
!include <material/common>
' To import the sprite file you DON'T need to place a prefix!
!include <material/folder_move>

MA_FOLDER_MOVE(Red, 1, dir, rectangle, "A label") {
}

class foo {
  bar
}
@enduml

«MA FOLDER_MOVE»A labelfoobar

27-11-1 Kubernetes

@startuml
!include <kubernetes/k8s-sprites-unlabeled-25pct>
package "Infrastructure" {
  component "<$master>\nmaster" as master
  component "<$etcd>\netcd" as etcd
  component "<$node>\nnode" as node
}
@enduml

Infrastructuremasteretcdnode

27-12-1 Logos

@startuml
!include <logos/flask>
!include <logos/kafka>
!include <logos/kotlin>
!include <logos/cassandra>

title Gil Barbara's logos example

skinparam monochrome true

rectangle "<$flask>\nwebapp" as webapp
queue "<$kafka>" as kafka
rectangle "<$kotlin>\ndaemon" as daemon
database "<$cassandra>" as cassandra

webapp -> kafka
kafka -> daemon
daemon --> cassandra
@enduml

Gil Barbara's logos examplewebappdaemon

27-12-2 Logos

@startuml
scale 0.7
!include <logos/apple-pay>
!include <logos/dinersclub>
!include <logos/discover>
!include <logos/google-pay>
!include <logos/jcb>
!include <logos/maestro>
!include <logos/mastercard>
!include <logos/paypal>
!include <logos/unionpay>
!include <logos/visaelectron>
!include <logos/visa>
' ...

title Gil Barbara's logos example - **Payment Scheme**

actor customer
rectangle "<$apple-pay>"    as ap
rectangle "<$dinersclub>"   as dc
rectangle "<$discover>"     as d
rectangle "<$google-pay>"   as gp
rectangle "<$jcb>"          as j
rectangle "<$maestro>"      as ma
rectangle "<$mastercard>"   as m
rectangle "<$paypal>"       as p
rectangle "<$unionpay>"     as up
rectangle "<$visa>"         as v
rectangle "<$visaelectron>" as ve
rectangle "..." as etc

customer --> ap
customer ---> dc
customer --> d
customer ---> gp
customer --> j
customer ---> ma
customer --> m
customer ---> p
customer --> up
customer ---> v
customer --> ve
customer ---> etc
@enduml

Gil Barbara's logos example -Payment Schemecustomer...

27-13-1 Office

@startuml
!include <tupadr3/common>

!include <office/Servers/database_server>
!include <office/Servers/application_server>
!include <office/Concepts/firewall_orange>
!include <office/Clouds/cloud_disaster_red>

title Office Icons Example

package "Sprites" {
  OFF_DATABASE_SERVER(db,DB)
  OFF_APPLICATION_SERVER(app,App-Server)
  OFF_FIREWALL_ORANGE(fw,Firewall)
  OFF_CLOUD_DISASTER_RED(cloud,Cloud)
  db <-> app
  app <--> fw
  fw <.left.> cloud
}
@enduml

Office Icons ExampleSpritesDBApp-ServerFirewallCloud

27-13-2 Office

@startuml
!include <tupadr3/common>

!include <office/servers/database_server>
!include <office/servers/application_server>
!include <office/Concepts/firewall_orange>
!include <office/Clouds/cloud_disaster_red>

' Used to center the label under the images
skinparam defaultTextAlignment center

title Extended Office Icons Example

package "Use sprite directly" {
  [Some <$cloud_disaster_red> object]
}

package "Different macro usages" {
  OFF_CLOUD_DISASTER_RED(cloud1)
  OFF_CLOUD_DISASTER_RED(cloud2,Default with text)
  OFF_CLOUD_DISASTER_RED(cloud3,Other shape,Folder)
  OFF_CLOUD_DISASTER_RED(cloud4,Even another shape,Database)
  OFF_CLOUD_DISASTER_RED(cloud5,Colored,Rectangle, red)
  OFF_CLOUD_DISASTER_RED(cloud6,Colored background) #red
}
@enduml

Extended Office Icons ExampleUse sprite directlyDifferent macro usagesSomeobjectDefault with textOther shapeEven another shapeColoredColored background

27-14-1 Open-Security-Architecture

@startuml
'Adapted from https://github.com/Crashedmind/PlantUML-opensecurityarchitecture-icons/blob/master/all
scale .5
!include <osa/arrow/green/left/left>
!include <osa/arrow/yellow/right/right>
!include <osa/awareness/awareness>
!include <osa/contract/contract>
!include <osa/database/database>
!include <osa/desktop/desktop>
!include <osa/desktop/imac/imac>
!include <osa/device_music/device_music>
!include <osa/device_scanner/device_scanner>
!include <osa/device_usb/device_usb>
!include <osa/device_wireless_router/device_wireless_router>
!include <osa/disposal/disposal>
!include <osa/drive_optical/drive_optical>
!include <osa/firewall/firewall>
!include <osa/hub/hub>
!include <osa/ics/drive/drive>
!include <osa/ics/plc/plc>
!include <osa/ics/thermometer/thermometer>
!include <osa/id/card/card>
!include <osa/laptop/laptop>
!include <osa/lifecycle/lifecycle>
!include <osa/lightning/lightning>
!include <osa/media_flash/media_flash>
!include <osa/media_optical/media_optical>
!include <osa/media_tape/media_tape>
!include <osa/mobile/pda/pda>
!include <osa/padlock/padlock>
!include <osa/printer/printer>
!include <osa/site_branch/site_branch>
!include <osa/site_factory/site_factory>
!include <osa/vpn/vpn>
!include <osa/wireless/network/network>

rectangle "OSA" {
  rectangle "Left:\n <$left>"
  rectangle "Right:\n <$right>"
  rectangle "Awareness:\n <$awareness>"
  rectangle "Contract:\n <$contract>"
  rectangle "Database:\n <$database>"
  rectangle "Desktop:\n <$desktop>"
  rectangle "Imac:\n <$imac>"
  rectangle "Device_music:\n <$device_music>"
  rectangle "Device_scanner:\n <$device_scanner>"
  rectangle "Device_usb:\n <$device_usb>"
  rectangle "Device_wireless_router:\n <$device_wireless_router>"
  rectangle "Disposal:\n <$disposal>"
  rectangle "Drive_optical:\n <$drive_optical>"
  rectangle "Firewall:\n <$firewall>"
  rectangle "Hub:\n <$hub>"
  rectangle "Drive:\n <$drive>"
  rectangle "Plc:\n <$plc>"
  rectangle "Thermometer:\n <$thermometer>"
  rectangle "Card:\n <$card>"
  rectangle "Laptop:\n <$laptop>"
  rectangle "Lifecycle:\n <$lifecycle>"
  rectangle "Lightning:\n <$lightning>"
  rectangle "Media_flash:\n <$media_flash>"
  rectangle "Media_optical:\n <$media_optical>"
  rectangle "Media_tape:\n <$media_tape>"
  rectangle "Pda:\n <$pda>"
  rectangle "Padlock:\n <$padlock>"
  rectangle "Printer:\n <$printer>"
  rectangle "Site_branch:\n <$site_branch>"
  rectangle "Site_factory:\n <$site_factory>"
  rectangle "Vpn:\n <$vpn>"
  rectangle "Network:\n <$network>"
}
@enduml

OSALeft: Right: Awareness: Contract: Database: Desktop: Imac: Device_music: Device_scanner: Device_usb: Device_wireless_router: Disposal: Drive_optical: Firewall: Hub: Drive: Plc: Thermometer: Card: Laptop: Lifecycle: Lightning: Media_flash: Media_optical: Media_tape: Pda: Padlock: Printer: Site_branch: Site_factory: Vpn: Network: 

27-15-1 Tupadr3-library

@startuml
!include <tupadr3/common>
!include <tupadr3/font-awesome/server>
!include <tupadr3/font-awesome/database>

title Styling example

FA_SERVER(web1,web1) #Green
FA_SERVER(web2,web2) #Yellow
FA_SERVER(web3,web3) #Blue
FA_SERVER(web4,web4) #YellowGreen

FA_DATABASE(db1,LIVE,database,white) #RoyalBlue
FA_DATABASE(db2,SPARE,database) #Red

db1 <--> db2

web1 <--> db1
web2 <--> db1
web3 <--> db1
web4 <--> db1
@enduml

Styling exampleweb1web2web3web4LIVESPARE

27-15-2 Tupadr3-library

@startuml
!include <tupadr3/common>
!include <tupadr3/devicons/mysql>

DEV_MYSQL(db1)
DEV_MYSQL(db2,label of db2)
DEV_MYSQL(db3,label of db3,database)
DEV_MYSQL(db4,label of db4,database,red) #DeepSkyBlue
@enduml

label of db2label of db3label of db4

sequence-autonumber

@startuml
autonumber 10 10

B -> A: Hello
A -> B: Yes?
B -> A: Fresh foo!

@enduml
BBAA10Hello20Yes?30Fresh foo!

sequence

@startuml
== Initialize ==
Alice->Bob : hello
note left: this is a first note
Bob->Alice : ok
note right: this is another note
Bob->Bob : I am thinking
note left
  a note
  can also be defined
  on several lines
end note
== Repeat ==
Alice -> Bob: message 1
Bob --> Alice: ok
|||
Alice -> Bob: message 2
Bob --> Alice: ok
||45||
Alice -> Bob: message 3
Bob --> Alice: ok
== Get Funky ==
Bob -->x Alice
Bob -->> Alice
Bob --\ Alice
Bob \\-- Alice
Bob -->o Alice
Bob <-->o Alice
Bob <--> Alice
note right: These are\nthe Funky arrows,\nYes,...
@enduml
AliceAliceBobBobInitializehellothis is a first noteokthis is another noteI am thinkinga notecan also be definedon several linesRepeatmessage 1okmessage 2okmessage 3okGet FunkyThese arethe Funky arrows,Yes,...