Collaboration uses

In composite structure diagrams, a collaboration use 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 use 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 uses that each involve a different set of roles and connectors for a given collaboration.
In a collaboration use, every collaboration role is bound to a connectable element with a classifier. After you type a collaboration use with a collaboration, you can open the collaboration use 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 use.

A collaboration representing a Car is applied as a use named SedanCar which is connected to two applied roles SedanDoor and SedanFrame.

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 use 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.


Feedback