How can I deactivate Lifetime events on participants in the order that I want? (sequence diagrams))

+1 vote
asked Nov 8, 2012 in Wanted features by czegledi (160 points)
retagged Nov 8, 2012 by plantuml
This question is linked to deactivation of lifetime events on participatns in sequence diagrams.
As far I see, the lifetime events are deactivated in the "Last in, First out " fashion, but I would like to deactivate them whenever I want. Is there a way to do it?

1 Answer

–1 vote
answered Nov 8, 2012 by plantuml (295,000 points)

I think I don't fully understand your question. You can have this :

participant Foo1
participant Foo2
Foo1 -> Foo2 : msg 1
activate Foo1
Foo1 -> Foo2 : msg 2
activate Foo2
Foo1 -> Foo2 : msg 3
deactivate Foo1
Foo1 -> Foo2 : msg 4
deactivate Foo2

You can also choose to deactivate Foo1 before Foo2. But I guess this is not what you are talking about.

commented Nov 15, 2012 by czegledi (160 points)
Unfortunately you haven't understood want I'm aiming for.  
At the moment, if several lifetime events are active at the same time on the same participant (your answer is for different participants), I can deactivate them in a Last In First Out fashion, but I want for example to deactivate first the another event, not the last one activated.
commented May 21, 2015 by pacheco (380 points)
I would like to request this as well...

Here is what we can only do:

and this is what I would like to achieve:

a->B ++: call ( )
B->B ++:
B-->a --: return
note over B: do some stuff

Maybe I would suggest an improvement on "return" keyword.
Something like: "return" would be the same as "return(1)" and if you set "return(x)" it it make the previous "x" call to return. [in this diagram would be return(2)]