……………………………………………….Expertise in .NET Technologies

Collaboration Diagram in UML

Posted by Ravi Varma Thumati on December 6, 2010

In the last article, we saw what Sequence diagrams are, the notations to be used in Sequence diagrams, their significance, and how to make a Sequence diagram using Poseidon. We then made a Sequence diagram for our Courseware Management System. The next in the dynamic diagrams in UML that we will cover is the Collaboration Diagram.


In the previous article, we covered the basics of a Sequence diagram. A Sequence diagram is dynamic, and, more importantly, is time ordered. A Collaboration diagram is very similar to a Sequence diagram in the purpose it achieves; in other words, it shows the dynamic interaction of the objects in a system. A distinguishing feature of a Collaboration diagram is that it shows the objects and their association with other objects in the system apart from how they interact with each other. The association between objects is not represented in a Sequence diagram.

A Collaboration diagram is easily represented by modeling objects in a system and representing the associations between the objects as links. The interaction between the objects is denoted by arrows. To identify the sequence of invocation of these objects, a number is placed next to each of these arrows.

Defining a Collaboration diagram

A sophisticated modeling tool can easily convert a collaboration diagram into a sequence diagram and the vice versa. Hence, the elements of a Collaboration diagram are essentially the same as that of a Sequence diagram.

Let us see in detail what the elements of Collaboration diagram are.

Elements of a Collaboration diagram

A Collaboration diagram consists of the following elements:

Element and its description Symbol
Object: The objects interacting with each other in the system. Depicted by a rectangle with the name of the object in it, preceded by a colon and underlined.
Relation/Association: A link connecting the associated objects. Qualifiers can be placed on either end of the association to depict cardinality.
Messages: An arrow pointing from the commencing object to the destination object shows the interaction between the objects. The number represents the order/sequence of this interaction.

Creating a Collaboration diagram

Figure 9.1: Screen shot of the Poseidon tool

The screen shot of the Poseidon tool in Figure 9.1 shows the different options to model Collaboration diagrams and define associations and interactions between objects. Since a Collaboration diagram is very similar to a Sequence diagram, a few sophisticated UML tools provide automatic generation of Collaboration diagrams from Sequence diagrams.

Case Study—Courseware Management System

In the Sequence diagram in the previous article, we had modeled the interaction for the “Manage course information” scenario. The static model of the Courseware Management System was built as a Class diagram. We will use these as the basis for modeling the Collaboration diagram of the “Manage course information” scenario.

Identifying states and events of the Course object

Per our Class diagram, we had defined that the primary (active) entity in the model is the Course Administrator. The Course Administrator interacted with different entities in the system, such as Course, Topic, and Tutor. The following associations were modeled:

  • The “User” entity interacted with the system as a Course Administrator
  • The Course Administrator entity has a “manages” association with the Course, Topic, and Tutor entities
  • The Course entity can contain 0 or more Topics

The interactions between these entities for the “manage course information” scenario upon which we modeled the sequence diagram were as under:

  • A user who is a course administrator invokes the manage course functionality.
  • The manage course functionality of the course administrator invokes either the course creation or course modification functionality of a course.
  • After the course is either created or modified, the manage topic functionality of the course administrator calls the topic creation or modification functionality of a topic.
  • Finally, the user invokes the assign tutor to course functionality of the course administrator to assign a tutor to the selected course.

Based on this, we will now model these associations and interactions in the Collaboration diagram for the “Manage course information” scenario.

Collaboration diagram

Figure 9.2: Collaboration diagram for the “Manage course information” flow

Figure 9.2 shows the Collaboration diagram for the “Manage course information” flow. The Collaboration diagram uses the CourseAdministrator, Course, Topic, and Tutor classes that we had defined earlier and used to define the sequence of events in the Sequence diagram in the previous article. Notice that, in addition to the messages that we had represented for the sequence diagrams, we also represent the association between these entities in the Collaboration diagram.


After this overview of Collaboration diagrams, we will cover the Component diagrams in UML in the next article.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: