Overlapping activations (multiple threads)

0 votes
asked May 6, 2017 in Closed question / help by purpletentacle (120 points)
I am trying to have overlapping activatins but they are always nested:

For instance:

@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!

1 Answer

0 votes
answered Jan 28 by Anthony-Gaudino (7,650 points)

If you activate a lifeline twice it will appear as nested, so you must deactivate it before reactivating.

@startuml
participant T1
participant T2
participant Main

T1 -> Main ++ #red: start
deactivate Main
T2 -> Main ++ #yellow: start

Main --> T1 -- #red : done
Main --> T2 -- #yellow : done
@enduml

I don't know exactly what you wanted to achieve.

...