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.
You must have a structure diagram open that contains a collaboration.
To add a role to a collaboration:
- In the Palette, click Composite
Structure Diagram and click Part.
- In the diagram editor, click a collaboration and specify the type
of part by completing one of the following steps:
- To create an unspecified part, click Unspecified.
- To create a new part that is typed by a class, click Create
New Class.
- To create a new part that is typed by a component, click Create
New Component.
- To create a new part that is typed by an interface, click Create
New Interface.
- To create a part from an existing element, click Select
Existing Element, select an element from the list of available
structured classifiers, and click OK.
- Type a name and press Enter.
- In the Properties view, click the Advanced tab.
- On the Advanced page, in the Property column,
expand UML.
- In the Property column, click Aggregation.
- In the Value column, click the down arrow
and click None. The role element changes
to a dashed outline.