Welcome to PlantUML Q&A, where you can ask questions and receive answers from other members of the community.

You can also submit new features request and vote for them.

Strange life line for self reference in sequence diagram

0 votes
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/
asked Feb 1, 2016 in bug by tsakitan (200 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:


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

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:
activate system1
note over system1: Start here
system1 -> system1 : Self-reference

Tell us if it's acceptable for you.

1 Answer

+1 vote
Best answer
answered Mar 7 by thefluffyone (480 points)
selected Mar 8 by plantuml
You can use teoz and a space ||0||:

!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
deactivate system1

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

system2 -> system1 ++ : Update status
system1 --> system2 -- : Response
deactivate system2
Very nice work around!
Thank you Serge!
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...)
You can switch "activate user" and "user -> system1 ++ : Submit request"
 and it is better for me
Support This Project Offer 250 Mo! Follow PlantUML on Twitter