multiple final states in state diagram

+1 vote
asked Feb 26, 2018 in Wanted features by tommens (120 points)
Hello, is it possible to have multiple final states at the same level (either at top level or within a composite states)?

If yes, how? i would like different states to point (via a transition) to a different final state. This is permitted in the UML or statecharts specification, it can be used to reflect different ways in which the behaviour described in a state (diagram) can terminate.

Sorry for my ignorance if this can be done, but I did not find any example on how this could be achieved.

1 Answer

+1 vote
answered Mar 16, 2018 by Anthony-Gaudino (5,720 points)
Is this what you're looking for: http://forum.plantuml.net/2868
commented Mar 17, 2018 by tommens (120 points)
Indeed, thanks! The possibility to label distinct final states at the same level, as in (*1) and (*2) was indeed the functionality I was looking for but for which I did not find any examples. This indeed solves my problem.
commented Jan 20, 2020 by Ulli

I'm not sure if I miss something but state diagrams use [*] as end nodes and do not support numbers. The answer (*1) is for activity diagrams and does not work for me in state diagrams (as of version 1.2020.0). 

What did work for me was:

@startuml

state Top
state Middle
state Bottom
state EndTop <<end>>
state EndBottom <<end>>

[*] -> Middle
Middle -up-> Top
Middle --> Bottom
Top -up-> EndTop
Bottom --> EndBottom

@enduml
...