Communication diagram

Communication diagram

The communication diagram is similar to the time diagram. The difference between these two diagrams is that the first does not have a lifeline. The diagram places the objects (the participants) and the interactions between them. This makes it possible to view the collective behavior of objects in order to perform an operation. The communication diagram represents collaborations (collection of objects): relationships, functionality and communications.

We use the communication diagram when starting a project, it helps to clarify the field of study, to frame the project. It is also useful to represent the collaboration between the field of study and the partners using the flows in, out, external actors and related fields.

Objects and communication

Objects are represented by a rectangle containing the name of the class and / or the name of the object. The objects communicate via messages: synchronous in full arrow, asynchronous in empty arrow, go message in solid line, return message in dotted line.

  • Synchronous: A message is sent from one object to another, and the first object waits until the action has finished.
  • Asynchronous: A message is sent from one object to another, but the first object does not wait for the action to complete.
  • Go: Each arrow represents a progression from one step to another in the sequence. Most asynchronous.
  • Return: The explicit return of an object to which the message was sent.

The messages have an indication to the message sent:

  • Messages sent at the same time: Using the Number-Letter notation
  • Messages invoked several times: Loop constraint * [i = 0..9]
  • Messages sent to a condition: Adding a logical expression [condition = true]
  • Messages sent to itself: A loop
uml communication diagram