Simplier way to deactivate lifeline without return message

0 votes
asked Jan 23, 2018 in Closed feature request by Anthony-Gaudino (5,720 points)

It's currently possible to activate a lifeline automatically by using the autoactivate on and also to use the return keyword to deactivate the lifeline and return something.

The problem with the return keyword is that it always returns something, it would be useful to be able to use the return without returning something, so it would just deactivate the lifeline, it would be useful for example when calling void methods which doesn't return anything.

Now we have to use:

autoactivate on

foo -> bar
    bar -> something
    deactivate something
deactivate bar

It would be better to have something simpler like:

autoactivate on

foo -> bar
    bar -> something
    deactivate
deactivate

OR:

autoactivate on

foo -> bar
    bar -> something
    return /' Just deactivates lifeline '/
return /' Just deactivates lifeline '

and then to really return something, make the user add the : character:

autoactivate on

foo -> bar
    bar -> something
    return : /' Returns without message '/
return : my message /' Returns with a message '/

1 Answer

0 votes
answered Jan 24, 2018 by plantuml (295,000 points)
selected Jan 24, 2018 by Anthony-Gaudino
 
Best answer

Nice idea!

So with last beta http://beta.plantuml.net/plantuml.jar you can now have:

@startuml
autoactivate on

Alice -> Bob : msg1
deactivate
Alice -> Bob : msg2
deactivate
@enduml


Is this what you were expecting ?

commented Jan 24, 2018 by Anthony-Gaudino (5,720 points)
Yes, that's it.
Just tested it out.

Thank you!
...