|Previous||UML Classes||Table of Contents||UML Packages||Next|
InteractionFragment (from BasicInteractions , Fragments ) on page 505
An InteractionUse refers to an Interaction. The InteractionUse is a shorthand for copying the contents of the referred Interaction
where the InteractionUse is. To be accurate the copying must take into account substituting parameters with arguments and
connect the formal gates with the actual ones.
It is common to want to share portions of an interaction between several other interactions. An InteractionUse allows multiple
interactions to reference an interaction that represents a common portion of their specification.
InteractionUse is a specialization of InteractionFragment .
An InteractionUse has a set of actual gates that must match the formal gates of the referenced Interaction.
• refersTo: Interaction Refers to the Interaction that defines its meaning.
• argument:InputPin[*] The actual arguments of the Interaction.
 Actual Gate s of the InteractionUse must match Formal Gate s of the referred Interaction. Gate s match when their names are
 The InteractionUse must cover all Lifeline s of the enclosing Interaction that appear within the referred Interaction.
 The arguments of the InteractionUse must correspond to parameters of the referred Interaction.
 The arguments must only be constants, parameters of the enclosing Interaction or attributes of the classifier owning the
The semantics of the InteractionUse is the set of traces of the semantics of the referred Interaction where the gates have
been resolved as well as all generic parts having been bound such as the arguments substituting the parameters.
The InteractionUse is shown as a CombinedFragment symbol where the operator is called ref. The complete syntax of the name
(situated in the InteractionUse area) is:
<name> ::=[<attribute-name> ‘=’ ] [<collaboration-use> ‘.’] <interaction-name>
[‘(‘ <io-argument> [‘,’ <io-oargument>]* ‘)’] [‘:’ <return-value>
<io-argument> ::= <in-argument> | ‘out’ <out-argument>]
The <attribute-name> refers to an attribute of one of the lifelines in the Interaction.
<collaboration-use> is an identification of a collaboration use that binds lifelines of a collaboration. The interaction name
is in that case within that collaboration. See example of collaboration uses in
The io-arguments are most often arguments of IN-parameters. If there are OUT- or INOUT-parameters and the output value is
to be described, this can be done following an out keyword.
The syntax of argument is explained in the notation section of Messages
(Message (from BasicInteractions ) on
If the InteractionUse returns a value, this may be described following a colon at the end of the clause.
In Figure 14.17 we show an
InteractionUse referring the Interaction EstablishAccess with (input) argument Illegal PIN. Within the optional CombinedFragment
there is another InteractionUse without arguments referring OpenDoor.
return parameter as Lifeline
inout parameter as
InteractionUse with valuereturn
argument with output
Figure 14.18 we
have a more advanced Interaction that models a behavior returning a Verdict value. The return value from the Interaction is
shown as a separate Lifeline a_op_b. Inside the Interaction there is an InteractionUse referring a_util_b with value return
to the attribute xc of :xx with the value 9, and with inout parameter where the argument is w with returning out-value 12.
Changes from previous UML
InteractionUse was not a concept in UML 1.x.