Previous | UML Classes | Table of Contents | UML Packages | Next |
A collaboration use represents the application of the pattern described by a collaboration to a specific situation involving
specific classes or instances playing the roles of the collaboration.
•
NamedElement (from Kernel , Dependencies ) on page 99
A collaboration use represents one particular use of a collaboration to explain the relationships between the properties of
a classifier. A collaboration use shows how the pattern described by a collaboration is applied in a given context, by binding
specific entities from that context to the roles of the collaboration. Depending on the context, these entities could be structural
features of a classifier, instance specifications, or even roles in some containing collaboration. There may be multiple occurrences
of a given collaboration within a classifier, each involving a different set of roles and connectors. A given role or connector
may be involved in multiple occurrences of the same or different collaborations.
Associated dependencies map features of the collaboration type to features in the classifier. These dependencies indicate
which role in the classifier plays which role in the collaboration.
No additional attributes
• type: Collaboration [1] The collaboration that is used in this occurrence. The collaboration defines the cooperation between its roles that are mapped to properties of the classifier owning the collaboration use.
• roleBinding: Dependency [*] A mapping between features of the collaboration type and features of the classifier or operation. This mapping indicates which connectable element of the classifier or operation plays which role(s) in the collaboration. A connectable element may be bound to multiple roles in the same collaboration use (that is, it may play multiple roles).
[1] All the client elements of a roleBinding are in one classifier and all supplier elements of a roleBinding are in one
collaboration and they are compatible.
[2] Every role in the collaboration is bound within the collaboration use to a connectable element within the classifier or
operation.
[3] The connectors in the classifier connect according to the connectors in the collaboration.
A collaboration use relates a feature in its collaboration type to a connectable element in the classifier or operation that
owns the collaboration use.
Any behavior attached to the collaboration type applies to the set of roles and connectors bound within a given collaboration
use. For example, an interaction among parts of a collaboration applies to the classifier parts bound to a single collaboration
use. If the same connectable element is used in both the collaboration and the represented element, no role binding is required.
It is a semantic variation when client and supplier elements in role bindings are compatible.
A collaboration use is shown by a dashed ellipse containing the name of the occurrence, a colon, and the name of the collaboration
type. For every role binding, there is a dashed line from the ellipse to the client element; the dashed line is labeled on
the client end with the name of the supplier element.
Issue 6423 - No practical applications of alternate presentation option found; deleting Presentation Options subsection.
This example shows the definition of two collaborations, Sale (
Figure 9.13) and
BrokeredSale (
Figure 9.14).
Sale is used twice as part of the definition of BrokeredSale. Sale is a collaboration among two roles, a seller and a buyer.
An interaction, or other behavior specification, could be attached to Sale to specify the steps involved in making a Sale.
BrokeredSale is a collaboration among three roles, a producer, a broker, and a consumer. The specification of BrokeredSale
shows that it consists of two occurrences of the Sale collaboration, indicated by the dashed ellipses. The occurrence wholesale
indicates a Sale in which the producer is the seller and the broker is the buyer. The occurrence retail indicates a Sale in
which the broker is the seller and the consumer is the buyer. The connectors between sellers and buyers are not shown in the
two occurrences; these connectors are implicit in the BrokeredSale collaboration in virtue of them being comprised of Sale.
The BrokeredSale collaboration could itself be used as part of a larger collaboration.
BrokeredSale
wholesale:
seller
retail: Sale
buyer
Figure 9.15 shows part of the
BrokeredSale collaboration in a presentation option.
Issue 8989 -reverse direction of arrows
«occurrence»
Sale
BrokeredSale
Figure 9.15 - A subset of the BrokeredSale collaboration
A collaboration use is used to specify the application of a pattern specified by a collaboration to a specific situation.
In that regard, it acts as the invocation of a macro with specific values used for the parameters (roles).
This metaclass has been added.