Previous UML Classes Table of Contents UML Packages Next


11.3.36 ReadSelfAction

IntermediateActions


   ReadSelfAction is an action that retrieves the host object of an action.

*Generalizations

   

    Action (from BasicActions ) on page 247

*Description

   Every action is ultimately a part of some behavior, which is in turn optionally attached in some way to the specification of a classifier (for example, as the body of a method or as part of a state machine). When the behavior executes, it does so in the context of some specific host instance of that classifier. This action produces this host instance, if any, on its output pin. The type of the output pin is the classifier to which the behavior is associated in the user model.

*Attributes

   No additional attributes

*Associations

   • result : OutputPin [1..1] Gives the output pin on which the hosting object is placed. (Subsets Action::output)

*Constraints

   [1] The action must be contained in a behavior that has a host classifier.

   self.context->size() = 1

   [2] If the action is contained in a behavior that is acting as the body of a method, then the operation of the method must not be static.

   [3] The type of the result output pin is the host classifier.

   self.result.type = self.context

   [4] The multiplicity of the result output pin is 1..1.

   self.result.multiplicity.is(1,1)

*Semantics

   Every action is part of some behavior, as are behaviors invoked by actions or other elements of behaviors. Behaviors are optionally attached in some way to the specification of a classifier.

   For behaviors that have no other context object, the behavior itself is the context object. See behaviors as classes in Common Behaviors and discussion of reflective objects in Activity (from BasicActivities , CompleteActivities , FundamentalActivities , StructuredActivities).

*Notation

   No specific notation

   ReadSelfAction is introduced to provide access to the context object when it is not available as a parameter.

*Changes from previous UML

   ReadSelfAction is unchanged from UML 1.5.