Deactivate not correct if last message is a message to itself

0 votes
asked Oct 25, 2016 in Bug by Serge Wenger Work (14,580 points)

V8048

Hello,

Deactivate is not correct if last message is a message to itself 

@startuml
!pragma teoz true
activate Bob
Bob -> Alice : hello
Bob-> Bob : aaa
'Workaround
'||0||
deactivate Bob
@enduml
 
As workaround, remove the comment before ||0||
Best regards
 

2 Answers

0 votes
answered Jul 15, 2019 by McFoggy (160 points)

Hi,

for me your solution does not work : see here

Only solution that I have found so far is to explicitly add a return before deactivation, see result here

@startuml
A -> B : start
activate B
B -> B : auto
B --> A
deactivate B
@enduml

Even the beta version, as found in this answer does not solve the issue.

commented Aug 5, 2019 by Serge Wenger Work (14,580 points)

Hello,

You forget the !pragma teoz true

@startuml
!pragma teoz true
A -> B : start
activate B
B -> B : auto
'B --> A
||0||
deactivate B
@enduml

commented Aug 5, 2019 by McFoggy (160 points)

you're right with both '!pragma teoz true' & '||0||' it works.

What does '||0||' represent in plantuml syntax?

commented Aug 5, 2019 by Serge Wenger Work (14,580 points)
||xx|| is space (see sequence description documentation)
0 votes
answered Jan 22, 2021 by Serge Wenger Work (14,580 points)

Another workaround is to add an hidden mesage (it work also without teoz)

 See On PlantUML server

...