I am trying to show overlapping activations in my sequence diagram (I am using PlantUML) but they are showing as nested activations:
For example:
@startuml
participant T1
participant T2
participant Main
T1 -> Main ++ #red: start
T2 -> Main ++ #yellow: start
Main --> T1 -- #red : done
Main --> T2 -- #yellow : done
@enduml
This will show nested red/yellow activations while I was expecting red to finish before yellow.
Is this supported? Am I doing something wrong?
Thanks!
If I understand the question properly, you are trying to show that Main
can be actived in parallel. If so, you should use a par fragment to indicate parallel operations (see Parallel Fragment). This can be depicted as follows:
@startuml
participant T1
participant T2
participant Main
par
T1 -> Main ++ #red: start
Main --> T1 -- #red : done
else
T2 -> Main ++ #yellow: start
Main --> T2 -- #yellow : done
end
@enduml
While the else
keyword is generally used for an alt/else fragment, it can also be used in other group types to add a visual separator. The resulting diagram of the above, is shown below.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With