UML Collaboration Diagram

UML Collaboration diagrams (interaction diagrams) illustrate the relationship and interaction between software objects. They require use cases, system operation contracts, and domain model to already exist. The collaboration diagram illustrates messages being sent between classes and objects (instances). A diagram is created for each system operation that relates to the current development cycle (iteration).

When creating collaboration diagrams, patterns are used to justify relationships. Patterns are best principles for assigning responsibilities to objects and are described further in the section on patterns. There are two main types of patterns used for assigning responsibilities which are evaluative patterns and driving patterns.

Each system operation initiates a collaboration diagram. Therefore, there is a collaboration diagram for every system operation. An example diagram for purchasing a bus ticket.

Example Collaboration Diagram

The route and seat objects are multi objects which means they are a collection of objects. The message, "purchaseTicket(route, preference) is the initializing message which is generated by the initializing actor. All other messages are generated by the system between objects. The initializing message is not numbered. The first message after the initializing message is numbered. Messages that are dependent on previous messages are numbered based on the number of the message they are dependent on. Therefore the message, "r=findRoute(route)" is numbered "1.1" since it is dependent on the message "s=findSeat(route, preference)". Any message path that is mutually exclusive is numbered with an "a" or "b". In finding route and seat messages, if finding a route or a seat were mutually exclusive, the numbering would be 1.1a and 1.1b. Patterns used for the association are associated with the message using a note.

The diagram should be split if it gets too large.

Unified Modeling Language Guide Contents Page