Sequence diagram
Elements
Figure 1. Core elements of a sequence diagram
PlantUML source
@startuml
' don't show participants at end of lifeline
hide footbox
participant Participant <<Stereotype>>
actor Actor <<Stereotype>>
box Box
boundary Boundary <<Stereotype>>
control Control <<Stereotype>>
entity Entity <<Stereotype>>
end box
database Database <<Stereotype>>
collections Collections <<Stereotype>>
queue Queue <<Stereotype>>
autonumber
Participant -> Actor: Message
autonumber stop
alt Main case
Actor -> Boundary : Main message
else Alternative case #1
Actor -> Control : Alternative message
note right: Note
group group [Extra label]
Control -> Entity
loop 1000 times
Entity -> Database ++
Entity -> Collections
return
Collections -> Entity
end
Database -> Collections
end
else Alternative case #2
Collections -> Actor
end
== Divider ==
...delay...
!pragma teoz true
{a} Actor -> Boundary ++
Boundary -> Boundary ++
Boundary -> Control ++
Control -> Entity !!
return
return
{b} Boundary --> Actor --
{a} <-> {b}: label
ref over Entity, Database: reference
@enduml