Book a Demo

Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

Prev Next

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, which has separate panels for the Source and Target role definitions, or
  • The Properties window for the connector, on the 'Source' and 'Target' tabs

The field descriptions here are the same for both source and target roles. This illustration shows the panels from the 'Properties' dialog; the Properties window tabs are almost identical.

Access

Ribbon

Start > Application > Design > Properties > click on connector in a diagram > Source   or    Target   (Properties window)

Design > Element > Editors > Properties > click on connector in a diagram > Source   or    Target   (Properties window)

Context Menu

Right-click on Connector | Properties > Role(s)    (connector 'Properties' dialog)

Keyboard shortcuts

Ctrl+2 > click on connector in a diagram > Source   or    Target   (Properties window)

Other

Double-click on Connector > Role(s)      (connector 'Properties' dialog)

Enter Role Definitions

Option

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:

  • *, or 0..* - zero, one or many instances
  • 0..n - zero or up to n instances, but no more than n
  • n - exactly n instances
  • n..* - n, or more than n instances

You can also define source and target role multiplicity in the corresponding element's attribute properties.

Cardinality

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 Browse. button at the end of the field and select a stereotype from the 'Stereotypes for <object name>' dialog.

Stereotype Selector

Alias

(Optional) Type in an alias for the role.

(Level of) 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 Browse. 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 indicate whether the role is derived from the properties that subset it (that is, derived from a strict union of all properties that are constrained to subset it). To change this flag, type 'F' or 'T' in the field, as appropriate.

As an example, you might set this field to True for a Class 'Schoolbus' with an attribute 'Passengers [0..48]' that is a derived union with these attributes subsetting it:

  • SeatedPassengers [0..36]
  • StandingPassengers [0..10]
  • WheelchairPassengers [0..2]

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 (Showing an owned Association end in Sparx Systems Enterprise Architect.).

Notes

  • Source role details are displayed at the start end of a connector on the diagram; if you have drawn the connector the wrong way, correct it by right-clicking on the connector and selecting the 'Reverse Direction' option
  • Target role details are displayed at the terminating end of a connector on the diagram