Previous UML Classes Table of Contents UML Packages Next


11.3.33 ReadLinkAction

IntermediateActions


   ReadLinkAction is a link action that navigates across associations to retrieve objects on one end.

*Generalizations

   

    LinkAction (from IntermediateActions ) on page 268

*Description

   This action navigates an association towards one end, which is the end that does not have an input pin to take its object (the open end). The objects put on the result output pin are the ones participating in the association at the open end, conforming to the specified qualifiers, in order if the end is ordered. The semantics is undefined for reading a link that violates the navigability or visibility of the open end.

*Attributes

   No additional attributes

*Associations

result : OutputPin [1] The pin on which are put the objects participating in the association at the end not specified by the inputs. (Subsets Action::output)

*Constraints

   [1] Exactly one link-end data specification (the open end) must not have an end object input pin.

   self.endData->select(ed | ed.value->size() = 0)->size() = 1

   [2] The type and ordering of the result output pin are the same as the type and ordering of the open association end.

   let openend : AssociationEnd = self.endData->select(ed | ed.value->size() = 0)->asSequence()->first().end in self.result.type = openend.type

   and self.result.ordering = openend.ordering

   [3] The multiplicity of the open association end must be compatible with the multiplicity of the result output pin.

   let openend : AssociationEnd = self.endData->select(ed | ed.value->size() = 0)->asSequence()->first().end inopenend.multiplicity.compatibleWith(self.result.multiplicity)

   [4] The open end must be navigable.

   let openend : AssociationEnd = self.endData->select(ed | ed.value->size() = 0)->asSequence()->first().end inopenend.isNavigable()

   [5] Visibility of the open end must allow access to the object performing the action.

   let host : Classifier = self.context in

   let openend : AssociationEnd = self.endData->select(ed | ed.value->size() = 0)->asSequence()->first().end in

   openend.visibility = #public

   or self.endData->exists(oed | not oed.end = openend

   and (host = oed.end.participant

   or (openend.visibility = #protected

   and host.allSupertypes->includes(oed.end.participant))))

*Semantics

   Navigation of a binary association requires the specification of the source end of the link. The target end of the link is not specified. When qualifiers are present, one navigates to a specific end by giving objects for the source end of the association and qualifier values for all the ends. These inputs identify a subset of all the existing links of the association that match the end objects and qualifier values. The result is the collection of objects for the end being navigated towards, one object from each identified link.

   In a ReadLinkAction , generalized for n-ary associations, one of the link-end data must have an unspecified object (the open end). The result of the action is a collection of objects on the open end of links of the association, such that the links have the given objects and qualifier values for the other ends and the given qualifier values for the open end. This result is placed on the output pin of the action, which has a type and ordering given by the open end. The multiplicity of the open end must be compatible with the multiplicity of the output pin. For example, the modeler can set the multiplicity of this pin to support multiple values even when the open end only allows a single value. This way the action model will be unaffected by changes in the multiplicity of the open end. The semantics are defined only when the open end is navigable, and visible to the host object of the action.

*Notation

   No specific notation

   ReadLinkAction is introduced to navigate across links.

*Changes from previous UML

   ReadLinkAction is unchanged from UML 1.5.