Skip to content

Sequence diagram

Boxlabel..Stereotype....Stereotype....Stereotype....Stereotype....Stereotype....Stereotype....Stereotype....Stereotype....Stereotype....Stereotype....Stereotype....Stereotype....Stereotype....Stereotype....Stereotype....Stereotype..«Stereotype»Participant«Stereotype»Actor«Stereotype»Boundary«Stereotype»Control«Stereotype»Entity«Stereotype»Database«Stereotype»Collections«Stereotype»Queue1Messagealt[Main case][Alternative case #1][Alternative case #2]Main messageAlternative messageNotegroup[Extra label]loop[1000 times]Dividerdelayrefreferencelabel
Boxlabel..Stereotype....Stereotype....Stereotype....Stereotype....Stereotype....Stereotype....Stereotype....Stereotype....Stereotype....Stereotype....Stereotype....Stereotype....Stereotype....Stereotype....Stereotype....Stereotype..«Stereotype»Participant«Stereotype»Actor«Stereotype»Boundary«Stereotype»Control«Stereotype»Entity«Stereotype»Database«Stereotype»Collections«Stereotype»Queue1Messagealt[Main case][Alternative case #1][Alternative case #2]Main messageAlternative messageNotegroup[Extra label]loop[1000 times]Dividerdelayrefreferencelabel

@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