Allow activate command right after deactivate

0 votes
asked Feb 2, 2019 in Question / help by arunc (120 points)

When using activate followed by deactivate, I see this error.

Is there a way to allow activate followed by deactivate? Without this the diagram that gets generated is not exactly right. See sequence numbers 4, 5, & 6 in the sequence diagram below.

skinparam defaultFontName Consolas
skinparam defaultFontSize 16
skinparam roundcorner 10
skinparam activityFontName Consolas
skinparam sequenceLifeLineBackgroundColor pink
skinparam sequenceMessageAlign center

actor User as User
participant "Store" as Store

activate User
User -> User : Take a photo

activate User
User -> User : Crop the regions
User -> User : Adjust the colors
User -> User : Save in gallery
deactivate User
User -> User : Finish photo capture
deactivate User

User -> User : Visit store
activate User
activate Store
User -> Store : Purchase food
Store -> Store : 
deactivate Store
deactivate User

1 Answer

0 votes
answered Jan 22, 2021 by Serge Wenger Work (15,620 points)

You can use hidden message

autonumber stop
User -[hidden]-> Store

deactivate User
User -[hidden]-> Store
autonumber resume

See on PlantUML server

commented Jan 22, 2021 by arunc (120 points)
Thanks. I've started using `autoactivate on`, so we don't have to call activate and deactivate explictly.
commented Jan 25, 2021 by Serge Wenger Work (15,620 points)

Yes you can use "autoactivate on",but the display is no more exactly the same: