UML 2 Composite Structure Diagrams: An Agile Introduction

UML 2 composite structure diagrams are used to explore run-time instances of interconnected instances collaborating over communications links. Figure 1 depicts a composite structure diagram for enrolling in a seminar. The dashed oval, Enroll in Seminar, models a collaboration. A collaboration enables you to model the relevant aspects of a cooperation between instances, indicating the objects and the roles that they take within the collaboration. The rectangles model instances of any type of classifier, including classes, objects, or interfaces. The properties used in the collaboration, such as the prerequisite seminars that a student has taken in the past, are optionally indicated with the classifier boxes.

Figure 1. Composite structure diagram for enrolling in a seminar.

An alternative form of this diagram is shown in Figure 2, something I refer to as a collaboration-style composite structure diagram. I'd really like to refer to this as a collaboration diagram, but my fear is that this name would be confusing for anyone familiar with UML 1.x's collaboration diagrams which are now called communication diagrams. In this diagram the collaboration symbol contains a detailed composite structure diagram, showing how the composite structure diagrams can effectively be nested within one another.

Figure 2. Collaboration diagram for the enrolling in a seminar.

It is interesting to note that UML composite structure diagrams are very similar to object role model (ORM) diagrams in notation. Although the two diagrams explore similar issues, structure, they do so in different ways. ORM diagrams are very good for explored detailed relationships between entities whereas the focus of composite structure diagrams is on exploring collaborations between entities.

To be honest I don't find composite structure diagrams to be of much use. I would much rather use UML sequence diagrams for exploring a collaboration because the notation is much more robust and because far more developers understand the notation.

Source

This artifact description is excerpted from Chapter 11 of The Object Primer 3rd Edition: Agile Model Driven Development with UML 2.


Translations


Disclaimer

The notation used in these diagrams, particularly the hand drawn ones, may not conform perfectly to the current version of the UML for one or more of reasons:

If you're really concerned about the nuances of "official" UML notation then read the current version of the UML specification.