How to Draw a Directed Association

Directed associationIn UML (Unified Modeling Language), an association can be used to represent that two classifiers which are related with each other. On any binary association, you may optionally put a solid triangular arrowhead near the name of the association to define the way the association should be read. In this article, we will see how to show the triangular arrowhead on an association in Visual Paradigm.

Here is a description about the use of arrowhead on an association, extracted from Object Management Group UML Specification 2.4:

On a binary association drawn as a solid line, a solid triangular arrowhead next to or in place of the name of the association and pointing along the line in the direction of one end indicates that end to be the last in the order of the ends of the association. The arrow indicates that the association is to be read as associating the end away from the direction of the arrow with the end to which the arrow is pointing. This notation is for documentation purposes only and has no general semantic interpretation. It is used to capture some application-specific detail of the relationship between the associated classifiers.

So you can apply a solid triangular arrowhead on an association to indicate the order of reading. To further explain the idea, take a look at the following UML diagram:

Simple directed association

Simple directed association

The solid triangle indicates the order of reading: The technician inspects vehicle. This may not be a perfect example because it is so clear that the association should be interpreted in this way, no matter the arrowhead is presented or not. But sometimes, indicating the direction of association does makes things clearer. Let’s study this example:

Directed association - another example

Directed association – another example

Without showing the arrowhead, readers won’t be able to tell whether it is the lab manager who supervises the lab technician or just the other way round. So, for this kind of case, you can manually show the arrowhead on association to tell the reader the proper way of reading and understanding the relationship between two classifiers.

Drawing directed association in Visual Paradigm

In Visual Paradigm, the arrowhead that indicates the direction of association can be shown by enabling the corresponding presentation option. Let’s take the following steps to enable the option:

  1. Right click on the association that you want to have the arrowhead appear.
  2. Select Presentation Options > Show Direction from the popup menu.

Note that the direction of association is determined how the association was created. If it was created by connecting class A to B, the arrowhead will point from A to B. If you want to change the direction of arrowhead, right click on the association and select Reverse Connector from the popup menu. By doing so, the ends of association will be swapped, so as their properties (e.g. role name, multiplicities, etc).

Related Articles

Related Links

 

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply