Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.
Source and Target Role
For certain types of connector, such as Association or Aggregation, the elements at either end of the connector can have defined roles. You define the roles in the connector 'Properties' dialog, on the 'Role(s)' tab.
The 'Role(s)' tab has two identical panels, one for each of the Source and Target role definitions. The field descriptions here apply to both panels.
Access On diagram | Double-click on connector > Role(s) or
On diagram | Right-click connector | Properties > Role(s)
Enter Role definitions
Field/Option/Button |
Action |
See also |
---|---|---|
<top field> |
Type the name of the role assigned to the element. Alternatively, click on the drop-down arrow and select an attribute name from the opposite element (that is, select the source role name from the names of attributes on the target element, and vice versa). |
|
<second field> |
Type any notes required to describe the role. |
|
Multiplicity |
||
Multiplicity |
Click on the drop-down arrow and select the required multiplicity for the role (you can edit the possible values of this field on the 'Cardinality' tab of the 'UML Types' dialog). Multiplicity is the range of instances of the role that can be active in the relationship - for example, one employee can be assigned to one or more tasks; for the target role you define the range of instances (such as tasks) that the employee could be assigned to. The values have these formats:
You can also define source and target role multiplicity in the corresponding element's attribute properties. |
Cardinality Attribute properties |
Ordered |
Click on the drop-down list and select True or False to indicate whether or not the role is an ordered list. |
|
Allow Duplicates |
Click on the drop-down list and select True or False to indicate that the role can contain duplicate elements (relevant only if multiplicity is > 1). This field maps to the UML property 'isUnique' (selecting the checkbox maps to the 'isUnique' value of False). |
|
Detail |
||
Stereotype |
(Optional) Type the name of a stereotype that applies to this end of the connector, or click on the button at the end of the field and select a stereotype from the 'Stereotype Selector' dialog. |
Stereotype Selector |
Alias |
(Optional) Type in an alias for the role. |
|
Access |
Click on the drop-down arrow and select the appropriate access level for the role. | |
Navigability |
Click on the drop-down arrow and select a value to indicate whether or not this role is navigable (whether non-navigable ends are shown on the diagram depends on the diagram properties). |
Connectors Tab |
Aggregation |
Click on the drop-down arrow and select a value to indicate the type of aggregation that this role uses. |
|
Scope |
Click on the drop-down arrow and select a value to indicate the level (instance or classifier) at which this role applies. |
|
Constraints |
Type the names of any constraints on the role. |
|
Qualifier(s) |
Type the names of any qualifiers or restrictions on the role; separate multiple qualifiers with a semi-colon. Alternatively, click on the button at the end of the field, and define a new qualifier on the 'Qualifiers' dialog (qualifiers typed into the 'Qualifiers' field are also automatically added to this dialog). |
Qualifiers Dialog |
Advanced |
||
Member Type |
Type the name of a role-type that can be used when generating collection Classes for multiplicity > 1. |
|
Changeable |
Click on the drop-down arrow and select a value to indicate whether this role is subject to change. |
|
Containment |
Click on the drop-down arrow and select a value to indicate the nature of the containment at the Destination (Reference or Value). |
|
Derived |
Click on the drop-down arrow and select True or False to indicate whether the role value or values can be computed from other information. |
|
Derived Union |
Click on the drop-down arrow and select True or False to indicate whether the role is derived from the properties that subset it. |
|
Owned |
Click on the drop-down arrow and select True or False to indicate whether the role is owned by the opposite Class rather than the Association. Selecting True adds a 'dot' to the appropriate end of the connector (). |
Notes
- Source role details are displayed at the start end of a connector; if you have drawn the connector the wrong way, correct it by selecting the 'Reverse Direction' option from the connector context menu
- Destination role details are displayed at the terminating end of a connector on the diagram