Adding roles to collaborations

In UML models, you can add a role to a collaboration to show the internal configuration of the collaboration. The role, which is represented by a part, also identifies the interaction and the behavior of a participant in the containing classifier.

Before you begin

You must have a model open in the Project Explorer view and the model must contain a collaboration.

About this task

To add a role to a collaboration:

Procedure

  1. In the Project Explorer view, right-click a collaboration and click Add UML > Role.
  2. In the diagram editor, click a collaboration and specify the type of part by completing one of the following steps:
    • To create an unspecified role, click Unspecified.
    • To create a new role that is typed by a class, click Create Class.
    • To create a new role that is typed by a component, click Create Component.
    • To create a new role that is typed by a node, click Create Node.
    • To create a new role that is typed by an interface, click Create Interface.
    • To create a new role that is typed by an actor, click Create Actor.
    • To create a role from an existing element, click Select Existing Element, select an element from the list of available structured classifiers, and click OK.
  3. Type a name and press Enter.

Results


Feedback