Legacy Issue Number: 14964
Source: Model Driven Solutions ( Ed Seidewitz)
Specification: OMG UML Superstructure, Version 2.3 (ptc/2009-09-09)
Subclause: 13.3.2 Behavior
Behavior::context is a derived association, with its derivation given by:
“If the behavior is owned by a BehavioredClassifier, that classifier is the context; otherwise, the context is the first BehavioredClassifier reached by following the chain of owner relationships. For example, following this algorithm, the context of an entry action in a state machine is the classifier that owns the state machine.”
However, an entry behavior is owned by a state which is owned by a region which must be owned (directly or indirectly) by a state machine. But a state machine is a behavior, which is a class, which is a behaviored classifier. Therefore, by the given algorithm, it is the state machine that is the context of the entry behavior, not the owner of the state machine, even if the state machine is a classifier behavior.
This is a serious problem, since the definition for Behavior::context further says “The features of the context classifier as well as the elements visible to the
context classifier are visible to the behavior.” And it is generally assumed in state machine modeling that an entry behavior in a state machine that is a classifier behavior has visibility to the elements of the owner of the state machine. Similarly, the semantics of a read self action is determined by the context of the activity that contains that action, and if that activity is the entry behavior of a state machine that is a classifier behavior, then the result of this action should be the owner of the state machine, not the state machine.
In summary, the second sentence given in the first quote above seems to be the true intent of Behavior::context. The first sentence should be changed to:
“To determine the context of a Behavior, find the first BehavioredClassifier reached by following the chain of owner relationships from the Behavior, if any. If there is such a BehavioredClassifier, then it is the context, unless it is itself a Behavior with a non-empty context, in which case that is also the context for the original Behavior.”
Reported: UML 2.3 — Tue, 12 Jan 2010 05:00 GMT
Disposition: Resolved — UML 2.4
Agreed, except that a slight change to the proposed text will also resolve Issue 14963
Updated: Fri, 6 Mar 2015 20:58 GMT