Previous UML Classes Table of Contents UML Packages Next


12.3.9 ActivityParameterNode

BasicActivities


   An activity parameter node is an object node for inputs and outputs to activities.

*Generalizations

   • ObjectNode (from BasicActivities , CompleteActivities ) on page 408

*Description

Issue 8217 -replace first sentence

   Activity parameter nodes are object nodes at the beginning and end of flows that provide a means to accept inputs to an activity and provide outputs from the activity, through the activity parameters.

   Activity parameters inherit support for streaming and exceptions from Parameter.

*Attributes

   No additional attributes

*Associations

Issue 8219 -add multiplicity and change ‘and’ to ‘or’

   • parameter : Parameter [1..1] The parameter the object node will be accepting or providing values for.

*Constraints

   [1] Activity parameter nodes must have parameters from the containing activity.

   [2] The type of an activity parameter node is the same as the type of its parameter.

Issue 8219 -reword constraint

   [3] An activity parameter node may have either all incoming edges or all outgoing edges, but it must not have both incoming and outgoing edges.

   [4] Activity parameter object nodes with no incoming edges and one or more outgoing edges must have a parameter with in or inout direction.

   [5] Activity parameter object nodes with no outgoing edges and one or more incoming edges must have a parameter with out, inout, or return direction.

   See Action (from CompleteActivities , FundamentalActivities , StructuredActivities) on page 323.

*Semantics

Issue 8219 -replace entire section by new text

   As a kind of behavior, an activity may have owned parameters. Within the activity, in and inout parameters may be associated with activity parameter nodes that have no incoming edges—they provide a source within the activity for the overall input values of the activity. Similarly, inout, out, and return parameters may be associated with activity nodes that have no outgoing edges—they provide a sink within the activity for the overall output values of the activity.

   Per the general semantics of a behavior, when the activity is invoked, its in and inout parameters may be given actual values. These input values are placed as tokens on those activity parameter nodes within the activity that are associated with the corresponding in and inout parameters, the ones which do not have incoming edges. The overall activity input values are then available within the activity via the outgoing edges of the activity parameter nodes.

   During the course of execution of the activity, tokens may flow into those activity parameter nodes within the activity that have incoming edges. When the execution of the activity completes, the output values held by these activity parameter nodes are given to the corresponding inout, out and return parameters of the activity.

   If the parameter associated with an activity parameter node is marked as streaming, then the above semantics are extended to allow for inputs to arrive and outputs to be posted during the execution of the activity (see the semantics for Parameter). In this case, for an activity parameter node with no incoming edges, an input value is placed on the activity parameter node whenever an input arrives on the corresponding streaming in or inout parameter. For an activity parameter node with no outgoing edges, an output value is posted on the corresponding inout, out or return parameter whenever a token arrives at the activity parameter node.

*Notation

   The label for parameter nodes can be a full specification of the corresponding parameter.

   Also see notation at Activity.


   Figure 12.52 - Activity notation

   The figure below shows annotations for streaming and exception activity parameters, which are the same as for pins. See Parameter for semantics of stream and exception parameters.


   Figure 12.53 - Activity notation

*Presentation Options

    If the round-cornered border of Figure 12.53 is replaced with the frame notation that is described in Annex A, then activity parameter nodes overlap the frame instead. If the round-cornered border or frame is omitted completely, then the activity parameter nodes can be placed anywhere, but it is clearer if they are placed in the same locations they would be in if the frame or border was shown.

   The presentation option at the top of the activity diagram below may be used as notation for a model corresponding to the notation at the bottom of the diagram.

Figure 12.54 - Presentation option for flows between pins and parameter nodes

   See presentation option for Pin when parameter is streaming. This can be used for activity parameters also.

*Examples

   In the example below, production materials are fed into printed circuit board. At the end of the activity, computers are quality checked.

Figure 12.55 - Example of activity parameters.nodes

   In the example below, production materials are streaming in to feed the ongoing printed circuit board fabrication. At the end of the activity, computers are quality checked. Computers that do not pass the test are exceptions. See Parameter for semantics of streaming and exception parameters.

   {stream}

Figure 12.56 - Example of activity parameter nodes for streaming and exceptions

   Activity parameter nodes are introduced to model parameters of activities in a way that integrates easily with the rest of the flow model.

*Changes from previous UML

   ActivityParameterNode is new in UML 2.0.