Collaboration occurrences

In composite structure diagrams, a collaboration occurrence is model element that represents one use of a collaboration to explain the relationships between the parts of a structured classifier. You use a collaboration occurrence to apply a pattern, which is described by a collaboration, to a specific situation that involves classes or instances that play the roles of the specified collaboration. You can have multiple collaboration occurrences that each involve a different set of roles and connectors for a given collaboration.

In a collaboration occurrence, every collaboration role is bound to a connectable element with a classifier. After you type a collaboration occurrence with a collaboration, you can open the collaboration occurrence in a composite structure diagram and view the roles of the parts in the occurrence. You can add a role binding connector, which is a simple dependency relationship, to bind or map the roles and the connectors that co-operate in a classifier according to the specific collaboration. You can add a role binding between the following items:

As the following figure illustrates, you can reuse the objects and roles in a specific collaboration and apply these elements as a pattern for specifying a situation that contains one collaboration occurrence.

A diagram frame contains a dashed
ellipse that has two compartments. The top compartment contains the name of
the collaboration, Car, and the bottom compartment contains two connected
roles, Role1 and Role2, that are represented by the parts Door and Frame.
Another smaller dashed ellipse is typed by Car, and is connected by a dashed
line to the two roles SedanDoor and SedanFrame, which are typed by the parts
Door and Frame, respectively. At the end of the connecting line that is closest
to the roles, a label prefaced with a plus sign is displayed. The label indicates
the name of the connectable element that is associated with each role.

In the above example, the collaboration named Car has two connected classifiers, Door and Frame, that represent the specific roles in the collaboration. The collaboration occurrence Sedan is displayed as a dashed ellipse that contains the name of the occurrence, a colon, and the name of the collaboration that it is typed with, Car. The example has two role bindings: one between the SedanDoor role and the Door collaboration role, and the other between the SedanFrame role and the Frame collaboration role. The label beside the dashed line, which is prefaced by a plus sign, indicates the name of the connectable element.

Related tasks
Creating collaboration occurrences in composite structure diagrams
Creating collaborations in composite structure diagrams
Binding collaboration occurrences and roles
Feedback
(C) Copyright IBM Corporation 2004, 2005. All Rights Reserved.