Strange life line for self reference in sequence diagram

+1 vote
asked Feb 1, 2016 in bug by tsakitan (210 points)
With the following example

activate foo
foo -> foo : bar
deactivate foo

 

a self reference is generated that ends beneath the life line. I would expect the life line to end beneath the self reference.

 

Possibly related to http://plantuml.sourceforge.net/qa/?qa=3756/
commented Mar 3 by thefluffyone (480 points)
Sorry to resurrect this one from the dead, but I'm seeing this same issue using the PlantUML plugin in VSCode (v1.2.4) which appears to be using v8049 of the PlantUML JAR.

Example code to reproduce:

@startuml

activate system1
note over system1: Start here
system1 -> system1 : Self-reference
deactivate system1

@enduml
commented Mar 7 by plantuml (132,110 points)
Do not be sorry, lifeline management is indeed not perfect with current version.
We are building a new version (see http://plantuml.com/teoz ) that will better handle lifeline.
Unfortunatly, we are progressing slowly on this side, and it's difficult to solve it with current code.

To turn around the issue, you could use:
@startuml
activate system1
note over system1: Start here
system1 -> system1 : Self-reference
@enduml

Tell us if it's acceptable for you.

1 Answer

+1 vote
answered Mar 7 by thefluffyone (480 points)
selected Mar 8 by plantuml
 
Best answer
commented Mar 8 by Serge Wenger Work (4,850 points)
Hello,
You can use teoz and a space ||0||:

@startuml
!pragma teoz true
participant user
participant system1
participant system2

user -> system1 ++ : Submit request
activate user
system1 -> system2 ++ : Store data
system2 --> system1 : Response
system1 --> user : Return response
deactivate user

system1 -> system1 : Update status
||0||
deactivate system1

system2 -> system3 ++ : Another action
system3 --> system2 -- : Response

system2 -> system1 ++ : Update status
system1 --> system2 -- : Response
deactivate system2
@enduml
commented Mar 8 by plantuml (132,110 points)
Very nice work around!
Thank you Serge!
commented Mar 8 by thefluffyone (480 points)
Hi Serge. Thanks for this. I did give Teoz a try, and your suggestion does resolve the self-reference issue, which is great! Unfortunately it looks as though Teoz has an issue with lifeline start for the "user" participant -- there is a gap between the arrow to system1 and the start of the user's lifeline :(

Obviously it's early days for Teoz, so I'm sure issues like this will be resolved in time!

(Also, not sure why my previous comment is an answer -- I must have clicked the wrong button to reply...)
commented Mar 8 by Serge Wenger Work (4,850 points)
You can switch "activate user" and "user -> system1 ++ : Submit request"
 and it is better for me
...