Search code examples
umlsequence-diagramplantuml

How to draw a participant inside another participant in a PlantUML sequence diagram?


Confluence + plantuml, https://plantuml.com/sequence-diagram

@startuml
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response

Alice -> Bob: Another authentication Request
Alice <-- Bob: Another authentication Response
@enduml

How to draw Chris inside the box of Alice pls ? So box of Alice contains box of Chris. Thx !


Solution

  • Use box,

    This is the sample from the doc https://plantuml.com/sequence-diagram

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

    it works for my simple case.