Previous UML Classes Table of Contents UML Packages Next


14.3.26 PartDecomposition

Fragments


*Generalizations

   

    InteractionUse (from Fragments ) on page 508

*Description

   PartDecomposition is a description of the internal interactions of one Lifeline relative to an Interaction.

   A Lifeline has a class associated as the type of the ConnectableElement that the Lifeline represents. That class may have an internal structure and the PartDecomposition is an Interaction that describes the behavior of that internal structure relative to the Interaction where the decomposition is referenced.

   A PartDecomposition is a specialization of InteractionUse . It associates with the ConnectableElement that it decomposes.

   Constraints

   [1] PartDecomposition s apply only to Parts that are Parts of Internal Structures not to Parts of Collaborations .

   [2] Assume that within Interaction X, Lifeline L is of class C and decomposed to D. Within X there is a sequence of constructs along L (such constructs are CombinedFragment s, InteractionUse and (plain) OccurrenceSpecifications). Then a corresponding sequence of constructs must appear within D, matched one-to-one in the same order. i) CombinedFragment covering L are matched with an extra-global CombinedFragment in D. ii) An InteractionUse covering L are matched with a global (i.e., covering all Lifeline s) InteractionUse in D. iii) A plain OccurrenceSpecification on L is considered an actualGate that must be matched by a formalGate of D.

   [3] Assume that within Interaction X, Lifeline L is of class C and decomposed to D. Assume also that there is within X an InteractionUse (say) U that covers L. According to the constraint above U will have a counterpart CU within D. Within the Interaction referenced by U, L should also be decomposed, and the decomposition should reference CU. (This rule is called commutativity of decomposition.)

   Semantics

   Decomposition of a lifeline within one Interaction by an Interaction (owned by the type of the Lifeline ’s associated ConnectableElement ), is interpreted exactly as an InteractionUse . The messages that go into (or go out from) the decomposed lifeline are interpreted as actual gates that are matched by corresponding formal gates on the decomposition.

   Since the decomposed Lifeline is interpreted as an InteractionUse , the semantics of a PartDecomposition is the semantics of the Interaction referenced by the decomposition where the gates and parameters have been matched.

   That a CombinedFragment is extra-global depicts that there is a CombinedFragment with the same operator covering the decomposed Lifeline in its Interaction. The full understanding of that (higher level) CombinedFragment must be acquired through combining the operands of the decompositions operand by operand.

   Notation

   PartDecomposition is designated by a referencing clause in the head of the Lifeline as can be seen in the notation section of Lifeline (from BasicInteractions , Fragments ) on page 511. See also Figure 14.20.

   If the part decomposition is denoted inline under the decomposed lifeline and the decomposition clause is the keyword strict, this indicates that the constructs on all sub lifelines within the inline decomposition are ordered in strict sequence (see CombinedFragment (from Fragments ) on page 487 on the strict operator).

   Extraglobal CombinedFragment s have their rectangular frame go outside the boundaries of the decomposition Interaction.

   Style Guidelines

   The name of an Interaction that is involved in decomposition would benefit from including in the name, the name of the type of the Part being decomposed and the name of the Interaction originating the decomposition. This is shown in Figure

    14.20 where the decomposition is called AC_UserAccess where ‘AC’ refers to ACSystem, which is the type of the Lifeline and UserAccess is the name of the Interaction where the decomposed lifeline is contained.

   Examples

Figure 14.20 - Part Decomposition - the decomposed part

   Part decomposition

    In Figure 14.20 we see how ACSystem within UserAccess is to be decomposed to AC_UserAccess, which is an Interaction owned by class ACSystem.

Figure 14.21 - PartDecomposition - the decomposition

   In Figure 14.21 we see that AC_UserAccess has global constructs that match the constructs of UserAccess covering ACSystem.

   In particular we notice the extra global interaction group that goes beyond the frame of the Interaction. This construct corresponds to a CombinedFragment of UserAccess. However, we want to indicate that the operands of extra global interaction groups are combined one-to-one with similar extra global interaction groups of other decompositions of the same original CombinedFragment .

   As a notational shorthand, decompositions can also be shown inline. In Figure 14.21 we see that the inner ConnectableElement s of :AccessPoint (p1 and p2) are represented by Lifeline s already on this level.

   Changes from previous UML

   PartDecomposition did not appear in UML 1.x.

Issue 8784 - add ReceiveOperationEvent and ReceiveSignalEvent metaclasses