Search code examples
stateuml

UML state chart - is it legal to exit a composite state from a meta state


Is it "legal" to for the only transition out of a composite state to originate from a decision node as shown in the picture?

http://pokit.org/get/?7358c1cf25ccd026b9ebe528768b0eb5.jpg

Yeah, I know the writing seems like I'm speaking in tongues. :) Apart from that, does the diagram make sense like this and is it valid according to UML rules?

Thank you for your time!


Solution

  • For full UML (2.5) compliance, you would need entryPoint and exitPoint pseudostates when you enter or exit a state. However, these are often not shown when there is no transition to/from a substate or when hierarchical state history is not tracked.

    So you would need an entryPoint pseudostate on the Zapoceta state that would act as the "bridge" between the initial point and the Nepotpuna states.

    Similarly, you would also need an exitPoint pseudostate in the Zapoceta state that would act as the "bridge" between the choice pseudostate and the Potpuna state.

    Also, you would not need an "or" constraint on the transitions between the Obracunata and Placena states. What you would have are different triggers for each transition. Having multiple transitions out of a state machine implies that the transitions' triggers are mutually exclusive.