Associations
Last updated
Was this helpful?
Last updated
Was this helpful?
Associations define the link between two entities in the use case diagram. These links can be between an actor and a use_case, two actors, or two use_cases.
To declare associations in use case diagrams use characters to draw the connection between the associated entities. The default association is defined by a double hyphen (--) between an actor and a use_case.
Associations have eight properties. Entity_1, entity_2, and association_type are required. The properties generally follow the below order. Direction is placed inside of the association type.
entity_1 - an actor or use_case
association_type - defined by a character drawing as a line or arrow
direction - determines the direction that the association line or arrow is drawn
entity_2 - an actor or use_case
line_color - defines the color of the association line or arrow
line_type - defines the type of line drawn for the association
text_color - determines the color of the text
text - can be used to explain the association
The entity fields contain either an actor name or use_case description. If either has an alias, use the alias.
Association_type is determined by a character drawing of a line or arrow. The three association types are shown below.
-- draws a line between the two entities
-- > draws an arrow between the two entities
--|> draws an open arrow between the two entities
There are three methods you can use to determine the direction of association lines.
direction_parameter - a setting used to determine association direction
character_drawing - drawing the direction of the association with characters
directional_word - determines the direction of the arrow with words
Note: Mixing direction_parameter with character_drawing or directional_word will result in the association line pointing the wrong direction.
The default direction for a use case diagram is top to bottom. The direction can be changed with the direction_parameter.
Direction can be determined by the number of dashes in the drawing as well as placement of the greater than or less than sign.
-- > draws a downward arrow
- > draws an arrow to the right
< -- draws an upward arrow
< - draws an arrow to the left
Direction can be determined by adding directional words to the middle of the association_type between the hyphens.
The line_color is defined by a standard color name or hex code. If you use this property alone it must come after a hash (#) sign and touch the hash sign. If any other properties follow this place a semicolon (;) between them. No spaces are needed.
The line_type defines the texture of the exterior line of the actor. If you use this property alone it must come after a hash (#) sign and touch the hash sign. If any other properties follow this place a semicolon (;) between them. No spaces are needed.
The line_types are as follows.
line.bold
line.dashed
line.dotted
The text_color determines the color of the text and is defined by a standard color name or hex code. If you use this property alone it must come after a hash (#) sign and touch the hash sign. If any other properties follow this place a semicolon (;) between them. No spaces are needed.
The text field can be used to describe the association between the two entities. Text supports creole for emphasis.