Here is my sample shown also on picture below
@startuml
participant "Client" as C
participant "Server" as S
participant "Third Party" as 3PT
C -> S++: request money
S -> S: do I know you?
S -> 3PT++: give me money for client
return here you have money
S ->> S++ #005500: compute usage
S ->> 3PT: notify about computation details
deactivate S
return money
@enduml
Is it possible in PlantUml sequence diagram somehow define the lifeline for async operation to end after lifeline from which it was started? So in this case I'd like to finish the compute usage
in green lifeline after return from request money
lifeline. By that I would say that compute usage
is asynchronous operation and can end at any time. Don't know whether this is valid from UML point of view though.
As I know there is no way for a reflexive message like
S ->> S++:...
orS ->> S:...
to start from an OccurrenceSpecification and finish to an other (and that for a lot of tools, including mine), so the only way seems to represent the Server two times. To clearly indicate it is the same server you can indicate the name the instance, for instance (naming all instances):The norm says §17.12.17.1 lifelines represent only one interacting entity, but an entity can be presented by several lifelines :
(notice the multiplicity
0..*
)Out of your problem it is strange to see the message
do I know you?
alone without consequences depending on the result, PlantUML manages combined fragment alt to indicate alternatives