Knowledge

UML Communication Diagram

Know it All about UML Communication Diagram

1: What is a Communication Diagram?

A Communication Diagram in UML visually represents the components of a system along with the interactions or messages exchanged between the object. It also shows the sequence of the messaging process; however, it is not similar to the interaction diagram entirely.

A communication diagram is an extension of an object diagram as it shows messages exchange along with the objects. Communication diagrams thus represent the associations among objects while showing the messages the objects exchange among them.

Though communication diagrams and sequence diagrams are not entirely similar, they have some standard features nevertheless. Communication diagrams and sequence diagrams show some standard set of information. However, one diagram conveys or emphasizes some specific information better than the other.

Communication diagrams have a free-form arrangement of objects or parts of a system. This is very similar to how classes and objects are arranged in class and object diagrams. The interactions between the objects or components of the system are shown in chronological order as they occur. Thus, you can place objects neat with the highest number of interactions between each other near one another. In this way, communication diagrams highlight the objects with the most number of communication with each other.

2: Purpose and benefit

Communication diagrams have a significant advantage over other diagrams because they are much more space-efficient. They are also very effective because they highlight the objects that have the most extensive number of communication instances going on. Also, elements can be easily placed or erased in both horizontal or vertical directions. Finally, it is highly beneficial in agile technologies because modifications are relatively easy and needed frequently.

Communication diagrams are used for multiple purposes. Some of them are discussed below.

  • Communication diagrams are used to model messages exchange between objects or roles to further refine the details needed to complete the functionalities of use cases and operations.
  • Communication diagrams also represent the communication mechanisms within the architectural design of the system.
  • Communication diagrams are also used in UML modeling because they help identify objects or classes, their attributes, and operations. For example, the attributes that contribute to the parameters of messages and processes are the passing of messages.
  • Communication diagrams also identify the alternative course of action within use cases or operations that involve the collaboration of different objects and interactions.

3: Communication Diagram Components

UML has a wide variety of diagrams, and each diagram uses a different set of notations or symbols. Therefore, it is essential to learn the other notations, particularly to communication diagrams, to make robust and effective diagrams. Communication diagrams have a few notations, including objects, links, and different types of messages that are the building blocks of any communication diagrams.

1、Objects

Objects can take different forms based on their role in the communication process. For example, they can be the sender or the receiver. Supplier objects supply the method that is called and therefore receives the message. Client objects call methods on supplier objects and therefore send messages.

2、Links

A link is a straight line that connects two objects and indicates a relationship between them. A link shows that the two objects can send messages to each other. Links are the elements that distinguish set communication diagrams from sequence diagrams. They offer the relationships between objects. If an object sends messages to itself, it is represented as a loop icon.

3、Messages

Messages in communication diagrams are represented as arrows from the Client object to the Supplier object. Messages express a client invoking an operation on a supplier object. Messages can be described as;

  1. Message icons that have one or more messages associated with them.
  2. Message text with a sequence number. Sequence numbers show the chronological order of the communication.

Different types of messages are:

  • Synchronous message
  • In synchronous messaging, a sender transmits a message and must wait for a response before continuing. The symbol of this message is a straight line and a solid arrowhead.

  • Asynchronous message
  • In an asynchronous message, a sender does not need to wait for a response before proceeding. This type of message is represented by a straight line and a lined arrowhead.

  • Sequence of messages
  • Typically, the sequence of messages is shown by a number on the message. The number determines the chronological order in which messages should be read.

4: How to Create a Communication Diagram in EdrawMax

Here are the steps for the creation of communication diagrams in the premium drawing software EdrawMax. EdrawMax is a great tool to draw professional quality UML diagrams quickly and in less time.

  1. Start the EdrawMax program.
  2. Go to New>Software Development and select the UML modeling tile.
  3. In the bottom pane, you can select the communication diagram template. You can modify this template according to your requirements. This is the most straightforward method for creating a communication diagram.

If you want to create the communication diagrams from scratch, then follow these steps instead.

Step 1: Start the EdrawMax program.

Open the software

Step 2: Go to New>Software Development and select the UML modeling tile.

Create from scratch or Select and edit a template

Step 3: Now, in the bottom pane, click the plus symbol tile.

click the plus symbol tile

Step 4: You will have a canvas available on your screen. You can search the communication diagram symbols in the left pane.

search the ment diagram symbols

Step 5: Drag the required symbol on your canvas and create your communication diagram . Once you are done with the required modifications, you can save and export your document in multiple formats.

save and export your document

EdrawMax

All-in-One Diagram Software
Create more than 210 types of diagrams effortlessly
Start diagramming with various templates and symbols easily
  • Superior file compatibility: Import and export drawings to various file formats, such as Visio
  • Cross-platform supported (Windows, Mac, Linux, Web, Android, iOS)
  • Learn How to Create a UML Communication Diagram
  • 5: Tips for Creating Communication Diagram

    While creating a communication diagram, you will be representing the logic for sophisticated procedure, function, or operation. A few general tips for a more functional communication diagram are;

    1. Determine the behavior that is required for the implementation. It is essential to plan and understand the detailed functionality of the use case.
    2. Carefully identify how commands are sent and received between artifacts, including objects and other components of a process.
    3. Also, visualize the consequences of specific interactions between components of the process.
    4. Also, pay attention and think about the alternative situations that may happen.

    6: UML Communication Diagram Example

    UML Communication Diagram Example

    This is an example of a communication diagram that is representing an order placing use case. First, the end-user communicates with the login process, and based on its result, s/he is given access to product search, cart, and order placement process. Next, the system also communicates with the payment processing and inventory.

    Related Articles