1. Home
  2. Docs
  3. Chapter 5. UML & Requirement Diagram
  4. 11. Composite Structure Diagram
  5. How to draw a Composite Structure Diagram in UML

How to draw a Composite Structure Diagram in UML

Download PDF

Composite structure diagram is a kind of UML diagram that visualizes the internal structure of a class or collaboration. It is a kind of component diagram mainly used in modeling a system at micro point-of-view.

Creating composite structure diagram

Perform the following steps to create a UML composite structure diagram.

  1. Select Diagram > New from the application toolbar.
  2. In the New Diagram window, select Composite Structure Diagram.
  3. Click Next.
  4. Enter the diagram name and description. The Location field enables you to select a model to store the diagram.
  5. Click OK.

Creating class

To create a class in composite structure, click Class on the diagram toolbar and then click on the diagram.

Create class
A class will be created.

Class created

Creating part

To create a part inside a class:

  1. Move your mouse pointer over the class.
  2. Click on the Resource Catalog button.
  3. Select New Part from Resource Catalog.

    A part is created.

Creating port

To create a port that attaches to a class:

  1. Move your mouse pointer over the class.
  2. Click on the Resource Catalog button.
    Clicking on Resource Catalog button
  3. Select New Port from Resource Catalog.
    To create port
    A port is created.
    Port created

Specifying type of port

Right-click the port and select Open Specification… from the pop-up menu. The Port Specification window appears.

Click the combo box of Type and select a class.

Select type
Click OK button to apply the changes. Type will be shown on the caption of the port.

Creating connector

To create connector, click Connector on the diagram toolbar.

Create connector
Drag from the source shape, move the mouse over the target shape and then release the mouse button to create the connector.

Connector created
Continue to complete the diagram.

Completed diagram