Role (dictionary item)
Non-aggregate Role
Aggregate Role with Port check box cleared (a Part)
Role with Port check box selected (a Port)
For automation interface information about a Role, click here
A Role is one end of an Association. A binary Association has a Role at each end. Roles can be identified by a Name, else the name of the associated item is used. Role names are similar to association direction names, except that a noun rather than a verb is used.
Role names can be used to:
Uniquely identify one end of an association.
Distinguish between two associations linking the same pair of items.
A Role can be shown on a Composite Structure Diagram as a part (Port check box cleared) or port (Port check box selected). For more information about parts and ports, see Overview of parts and Overview of ports.
Modeler create two Roles (start and end) when an Association is created in the model. Initially the Roles are unnamed, but you can rename the Roles through either the Dictionary pane, or through the In Role boxes on the Start Role and End Role tabs of an Association's Property Pages. An Association is always linked to a Start Role and an End Role.
You can create a composite Role through the Part and Port buttons on the Composite Structure Diagram tab.
In the Packages and Parts pane, a Role's name is shown as follows:
When used on a Class Diagram, a Role's notation is as follows:
For information about the View Options available for this symbol, see Association view options - class diagram.
When used on a Composite Structure Diagram, a composite Role's notation is as follows:
If a Part contains a Part that has had its Default Value changed in context, on a Composite Structure Diagram the type of the containing Part is shown in brackets. In the following example, the tire part in context has a Default Value that is different from the tire part on the type, that is, the Wheel Class.
The View Options of a Part or Port allow you to snap a Part or Port inside the boundary, on the boundary or outside the boundary of the owning Part or Port. In addition, you can show a Part's Name and associated text outside of the Part through the View Options - select the Show Text As Floating Attachment check box.
For more information about the View Options available for this symbol, see the following topics:
On a Composite Structure Diagram, top-level Parts can be shown as frames through the Part's View Options.
* 
Non-composite and non-aggregate Part and Ports are shown with a dashed outline. To show Parts and Ports as top-level items, drag the Part or Port to free space on the diagram.
If a Part is shown out of context, its full containment path is shown. You can add or move a Part on a Composite Structure Diagram without rescoping it by holding down the Alt key whilst you drag the Part.
When used on a Sequence Diagram, a composite Role's (Part or Port instance) notation is as follows.
* 
You add a Part or Port to a Sequence Diagram by dragging the item from a Modeler pane. Use the Parts pane to view Parts and Ports in context.
In the Modeler panes, a short-cut symbol on the Role's icon indicates that the item is a stub.
The full name of a role is derived as follows:
<role name> [<item name at role end of association> - <role/item name at other end of association>]
* 
If you select the UML\Roles folder in the Dictionary pane, the Contents pane displays the following information about each Role in the model: Association.
The following sections provide information about how a Role is used in the model. For more information about a property, item, model part or diagram, click it.
Properties
In addition to the standard properties, a Role has these properties:
Behavior - applies only when the Role is a Port. (Is Behavior through the automation interface.)
Composite (Is Composite through the automation interface)
Conjugated - applies only when the Role is a Port. (Is Conjugated through the automation interface.)
Default (Default Value through the automation interface)
Derived (Is Derived through the automation interface)
Multiplicity (My Multiplicity through the automation interface)
Port (Is Port through the automation interface)
Service - applies only when the Role is a Port. (Is Service through the automation interface.)
Unique (Is Unique through the automation interface)
Visibility (Access through the automation interface)
An instance of an Attribute (Part or Port instance on Sequence Diagram) can have these additional Properties:
Owned by
Attribute (only when part or port)
Class (at the other end of the association)
Role (only when part or port)
Owns
Attribute (only when part or port)
Association - The Association is owned jointly by the Role (as a Part or Port) and the other associated item. The access permissions you have to an Association are determined by the access permissions you have to the item at the start end of the Association.
Dependency - The Dependency is owned jointly by the Role and the other associated item. The access permissions you have to a Dependency are determined by the access permissions of the dependent item.
IO Flow - The IO Flow is owned jointly by the Role (as a Part or Port), the IO Flow's other linked item and the IO Flow's IO Item.
Role (only when part or port)
Defined in these parts of the model
Used in these parts of the model:
Shown on these diagrams
Sequence Diagram - Instance of Part or Port is shown.
For information about how the View Options affect the presentation of Roles, see the following topics:
Can be linked to these dictionary items
Was this helpful?