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

0 votes
asked Sep 28 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

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:

[Antispam2 Feature: please please wait 1 or 2 minutes (this message will disappear) before pressing the button otherwise it will fail](--------)
To avoid this verification in future, please log in or register.
...