How to reuse same concurrent states from different outter state in state diagram

0 votes
asked Dec 16, 2015 in Wanted features by isabellf (120 points)
Hi.

I wanted to represent nested component states within a state diagram using concurrent states like this:

@startuml
state TopLevelComponentStateOne {
 InnerComponentAStateOne --> InnerComponentAStateTwo
 --
 InnerComponentBStateOne --> InnerComponentBStateTwo
 --
 InnerComponentXStateOne --> InnerComponentXStateTwo
}

state TopLevelComponentStateTwo {
 InnerComponentAStateTwo1 --> InnerComponentAStateOne1
 --
 InnerComponentBStateTwo1 --> InnerComponentBStateOne1
 --
 InnerComponentXStateTwo1 --> InnerComponentXStateOne1
}
TopLevelComponentStateOne --> TopLevelComponentStateTwo
TopLevelComponentStateTwo --> TopLevelComponentStateOne

@enduml

However, I'd expect to be able to reuse "InnerComponentAStateTwo" in both  "TopLevelComponentStateTwo" and "TopLevelComponentStateOne" , however if I try to do this I get: "The state has been created in a concurrent state" error.

So as a workaround I made it unique by adding a '1' suffix ...

Maybe I should use a different approach, but my system really allows componentA to have the same state even if it's container has a different state.  If this is a limitation, I'd be willing to test a beta that fixes it!

Thank you.

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.
...