Previous UML Classes Table of Contents UML Packages Next


12.3.48 StructuredActivityNode

CompleteStructuredActivities , StructuredActivities


   (StructuredActivities) A structured activity node is an executable activity node that may have an expansion into subordinate nodes as an ActivityGroup . The subordinate nodes must belong to only one structured activity node, although they may be nested.

*Generalizations

*Description

Issue 8272 -add text

   A structured activity node represents a structured portion of the activity that is not shared with any other structured node, except for nesting. It may have control edges connected to it, and pins when merged with CompleteActivities or on specializations in CompleteStructuredActivities . The execution of any embedded actions may not begin until the structured activity node has received its object and control tokens. The availability of output tokens from the structured activity node does not occur until all embedded actions have completed execution (see exception at AcceptEventAction (from CompleteActions )).

   Package CompleteStructuredActivities

   Because of the concurrent nature of the execution of actions within and across activities, it can be difficult to guarantee the consistent access and modification of object memory. In order to avoid race conditions or other concurrency-related problems, it is sometimes necessary to isolate the effects of a group of actions from the effects of actions outside the group. This may be indicated by setting the mustIsolate attribute to true on a structured activity node. If a structured activity node is isolated, then any object used by an action within the node cannot be accessed by any action outside the node until the structured activity node as a whole completes. Any concurrent actions that would result in accessing such objects are required to have their execution deferred until the completion of the node.

   Note – Any required isolation may be achieved using a locking mechanism, or it may simply sequentialize execution to avoid concurrency conflicts. Isolation is different from the property of atomicity, which is the guarantee that a group of actions either all complete successfully or have no effect at all. Atomicity generally requires a rollback mechanism to prevent committing partial results.

*Attributes

Issue 9191 -add default value

   • mustIsolate : Boolean If true, then the actions in the node execute in isolation from actions outside the node. Default value is false.

*Associations

Issue 8272 -add subsets constraint

   • variable: Variable [0..*] A variable defined in the scope of the structured activity node. It has no value and may not be accessed outside the node. {Subsets Namespace ::ownedMember}

   Issue 8272 -remove package subheading;add entry for activity 9106 -rename ‘containedNode’ to ‘node’ and fix constraint 9108 -replace ‘activity’ to ‘inActivity’

Issue 8272 -add package subheading and entry for containedEdge 9105 -rename ‘containedEdge’ to ‘edge’ and fix constraint

*Constraints

   Package CompleteStructuredActivities

   [1] The edges owned by a structured node must have source and target nodes in the structured node, and vice versa.

*Semantics

   Nodes and edges contained by a structured node cannot be contained by any other structured node. This constraint is modeled as a specialized multiplicity from ActivityNode and ActivityEdge to StructuredActivityNode . Edges not contained by a structured node can have sources or targets in the structured node, but not both. See children of StructuredActivityNode .

   No subnode in the structured node, including initial nodes and accept event actions, may begin execution until the structured node itself has started. Subnodes begin executing according to the same rules as the subnodes of an activity (see InitialNode (from BasicActivities ) on page 392 and AcceptEventAction (from CompleteActions ) on page 245). A control flow from a structured activity node implies that a token is produced on the flow only after no tokens are left in the node or its contained nodes recursively. Tokens reaching an activity final node in a structured node abort all flows in the immediately containing structured node only. The other aspects of termination are the same as for activity finals contained directly by activities (see ActivityFinalNode (from BasicActivities , IntermediateActivities ) on page 343).

   Package CompleteStructuredActivities

   An object node attached to a structured activity node is accessible within the node. The same rules apply as for control flow. Input pins on a structured activity node imply that actions in the node begin execution when all input pins have received tokens. An output pin on a structured activity node will make tokens available outside the node only after no tokens are left in the node or its contained nodes recursively.

Issue 8500- remove ‘any action inside’

   If the mustIsolate flag is true for an activity node, then any access to an object by an action within the node must not conflict with access to the object by an action outside the node. A conflict is defined as an attempt to write to the object by one or both of the actions. If such a conflict potentially exists, then no such access by an action outside the node may be interleaved with the execution of the node. This specification does not constrain the ways in which this rule may be enforced. If it is impossible to execute a model in accordance with these rules, then it is ill formed.

*Notation

Issue 8272 - fix typo and add figure

   A structured activity node is notated with a dashed round cornered rectangle enclosing its nodes and edges, with the keyword «structured» at the top (see Figure 12.133). Also see children of StructuredActivityNode .

   «structured»

Figure 12.133 Notation for structured nodes

*Examples

   See children of StructuredActivityNode .

   StructuredActivityNode is for applications that require well-nested nodes. It provides well-nested nodes that were enforced by strict nesting rules in UML 1.5.

*Changes from previous UML

   StructuredActivityNode is new in UML 2.0.