Question

In UML (let's take specification 2.4.1), when considering orthogonal composite states, entry and exit points belong either to the (enclosing) composite state or to the region the entry / exit point is drawn in. So which is it?

I cannot find this explicitly in the specification, but this is what the spec says about the subject (taken from paragraph 15.3.8 of the superstructure specification): "An entry point pseudostate is an entry point of a state machine or composite state. In each region of the state machine or composite state it has at most a single transition to a vertex within the same region."

From this I infer that entry points belong to the region they are applied to. If so, how do I model entry / exit actions for the enclosing state? Do I have to repeat a 'state-wide entry action' on every entry point I use? This seems cumbersome and redundant when using many regions. Or do I have to create a 'greater' state that has its own entry / exit points (or 'entry / ...' and 'exit / ...' lines), which in turn encloses the composite state which contains the regions? This seems rather complex. Can somebody clarify this for me with a visual example?

Was it helpful?

Solution

If you want to model actions that are executed before entering the orthogonal regions, yes: you need to create an enclosing state (See Fig. 15.35 "Orthogonal state with regions" in 2.4.1 superstructure).

From clause 15.3.11:

A composite state either contains one region or is decomposed into two or more orthogonal regions. Each region has a set of mutually exclusive disjoint subvertices and a set of transitions. A given state may only be decomposed in one of these two ways.

On the other side, if all you need are entry/exit pseudostates, you can avoid that additional complexity. See the paragraph about Composite state, its Description and Semantic variation point (default entry rule) in clause 15.3.11.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top