Choice Pseudostate and Guard Condition in State Diagrams

+6 votes
asked Jul 26, 2013 in Wanted features by TomekR (120 points)


I'm not sure if the "Choice Pseudostate in State Diagrams" feature (see here) has already been requested? If not may I kindly ask the developers to give your favorable consideration?

Without this functionality it's really hard to use this amazing tool in advanced state diagrams projects.



Tomek R.



1 Answer

+5 votes
answered Jul 26, 2013 by plantuml (295,000 points)


You can use:

state choice1 <<choice>>
state foo1 <<fork>>
state foo2 <<join>>
state foo3 <<end>>
[*] --> choice1
choice1 --> foo1
choice1 --> foo2
choice1 --> foo3

It's not documented (because we are not 100% satisfy by the syntax), but it's working fine.


commented Mar 29, 2019 by edobez (140 points)
Is there a way to change the skinparams of those pseudo-states?
For example the background and border color.
commented Mar 29, 2019 by edobez (140 points)
Found this myself: choice pseudo-state is actually part of the activity diagrams, so the skinparam is set using the `activity` group. Example:

skinparam activity {
    BackgroundColor White
    BorderColor Black