Missing pseudo states in states diagram

0 votes
asked Aug 20, 2019 in Wanted features by Kjeld
Currently states diagram has fork, join and orthogonal states, but what about the diamond shaped choice state?

1 Answer

0 votes
answered Aug 20, 2019 by anonymous
What is also missing is the possibility to put enter and exit actions on states, as well as H and H*
commented Aug 20, 2019 by Serge Wenger Work (12,800 points)

You can do like this: 


hide empty description

skinparam state {

BackgroundColor<<History>> Yellow


State Off

State Off : Entry: x.PowerLed(false);

State Off : Exit: x.Dummy1();

State On {

state "H" as On_H <<History>>

state "Step1" as On_Step1

state "Step2" as On_Step2

state "Step3" as On_Step3

[*] -right-> On_Step1

On_Step1 -right-> On_Step2

On_Step2 -right-> On_Step3

On_Step3 -> [*]


State On : Entry: x.PowerLed(true)

[*] -> Off

Off -up-> On_H : SwitchOn

On -> Off : SwitchOff



commented May 8 by Mihai

Ok, but what about the diamond shape to model choices? https://www.uml-diagrams.org/state-machine-diagrams.html#choice-pseudostate

commented May 8 by Serge Wenger Work (12,800 points)

I am only a user, but it is currently not possible to use diamond shape to the best of my knowledge. Please create a new request

commented May 8 by Mihai

Actually there is a solution, one can use the <<choice>> pseudostate. I found it here:


Thank you PlantUML Team!