[BUG] Only one transition permitted to State[H] in state diagram

0 votes
asked Sep 28, 2023 in Bug by anonymous
State diagrams only permit one transition to a given state using the StateIdentifier[H] syntax.  The limitation to target the history pseudo-state does not exist if a more verbose <<history>> alias is defined within the target state and the state transitions are placed (1) after the target state definition and (2) target the history alias.
@startuml
[*] --> Foo
Foo --> Bar : Ev1
Foo --> a[H] : Ev2
Bar --> a[H] : Ev3
@enduml
The following much more verbose syntax does permit multiple transitions to the history state

@startuml

state a {
   state history as "History" <<history>>
}
[*] --> Foo
Foo --> Bar : Ev1
Foo --> history : Ev2
Bar --> history : Ev3

@enduml

The downside to this method is that the state with history must be defined before the transitions to the history alias

1 Answer

0 votes
answered Dec 5, 2023 by The-Lu (64,760 points)

Hi A., and all,

FYI, that is fixed on the last version V1.2023.12 (20 Oct, 2023)., see:

Thanks to the PlantUML team,
Regards,
Th.

...