The communication diagram is similar to the time diagram. The difference between these two diagrams is that the first one 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 clarifies the field of study, to frame the project. It is also useful for representing collaboration between field of study and partners using incoming, outgoing flows, external actors and related fields.
Objets 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 full arrow, asynchronous empty arrow, message in full line, return message is dotted.
- 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 by one object to another, but the first object does not wait for the end of the action.
- Message: Each arrow represents a progression from one step to another in the sequence. Mostly asynchronous.
- Return: The explicit return of an object to which the message was sent.
Messages have an indication to the message sent:
- Sent at the same time: Using Letter-Number notation
- Messages invoked multiple times: Loop constraint * [i = 0..9]
- Messages sent to a condition: Adding a logical expression [condition = true]
- Messages sent to itself: A loop