bug state machine diagram?

0 votes
asked Oct 26, 2017 in Bug by Franck
This simple state machine diagram seems to raise a bug. This comes from having a substate with the same name (Off) in two exclusive states (Open, Closed). Link to the SVG image:

http://franckbarbier.com/Java/Capture.PNG

state Microwave {
state Open {
state Paused

state Off
[*] --> Off

}
[*] --> Closed
state Closed {
state Off
[*] --> Off

state Baking

}
}

1 Answer

0 votes
answered Oct 26, 2017 by plantuml (158,940 points)

This is really a design/conception bug.
States and substates does not define namespace. Unfortunately, changing this behavior is not so easy.

As workaround, you can have:

@startuml
state Microwave {
state Open {
state Paused

state "Off" as Off1
[*] --> Off1

}
[*] --> Closed
state Closed {
state "Off" as Off2
[*] --> Off2

state Baking

}
}
@enduml

Hope this helps!

...