A UML Composite Structure Diagram provides a detailed view of how a class, component, or other structured classifier is internally organized. Instead of treating a complex element as a single black box, it reveals the parts that make it up, the ports through which it interacts with its environment, and the connectors that link its internal elements together.
Visual Paradigm Desktop provides a dedicated Composite Structure Diagram editor for creating these models. With its visual modeling tools and Resource Catalog, you can define internal parts, add ports, specify their types, and connect the elements to describe how a structured element is assembled and how its internal roles collaborate.
Whether you are designing a complex software class, documenting the internal organization of a subsystem, or explaining how different objects cooperate to provide a capability, Visual Paradigm helps you make the internal structure easier to understand, communicate, and refine.
What Is a UML Composite Structure Diagram?
A UML Composite Structure Diagram is a structural diagram in the Unified Modeling Language (UML) that shows the internal structure of a structured classifier and the collaborations that this structure makes possible.
A structured classifier is a UML element whose internal composition can be described in terms of interconnected parts. These parts represent roles played by instances within the containing classifier. Ports define interaction points, while connectors show how the parts and ports are linked.
For example, consider an online shopping system. A class diagram might show that an Order is associated with Payment, Inventory, and Shipping classes. A Composite Structure Diagram can go further by showing how an Order-processing component is internally organized, which parts it contains, and how those parts communicate through their connections.
This makes the diagram particularly useful when the internal organization of an element is important to the design.
A Composite Structure Diagram typically focuses on:
- Internal parts: The constituent elements that make up a structured classifier.
- Ports: The interaction points through which a classifier or its internal parts communicate.
- Connectors: The links that connect parts and ports.
- Interfaces: The services that a part or classifier provides or requires.
- Collaborations: The roles and connections that work together to achieve a particular purpose.
In Visual Paradigm Desktop, these concepts can be represented visually, allowing developers and architects to examine the internal organization of a model without having to describe every relationship in prose.
Why Composite Structure Diagrams Matter
Class diagrams are excellent for describing the static relationships between classes. However, they do not always communicate where a relationship exists within a complex class or how the internal elements of a classifier are connected.
A Composite Structure Diagram addresses this need by providing a more detailed view of an element’s internal composition.
Look inside complex classes and components
A complex class or component may contain several internal elements, each responsible for a particular role. Showing the containing element alone can hide important implementation details.
A Composite Structure Diagram allows you to open up that element conceptually and show its internal parts. This makes it easier to understand how a larger element is assembled from smaller elements.
Clarify internal relationships
A class diagram can show that two classes are associated, but it may not make clear how that relationship is realized within a particular composite structure.
A Composite Structure Diagram can show the specific parts involved and the connectors that link them. This gives the team a more precise view of the internal organization.
Define interaction boundaries
Ports provide explicit interaction points between a classifier and its environment, or between the classifier and its internal parts.
This helps distinguish an element’s external interaction boundary from the internal connections that support its behavior.
Communicate design responsibilities
By assigning clear roles to internal parts, teams can discuss which elements are responsible for particular capabilities and how they cooperate.
This is useful during architecture reviews, detailed design discussions, implementation planning, and technical documentation.
Support more precise design decisions
When internal dependencies are visible, developers can examine whether responsibilities are distributed appropriately, whether connections are unnecessarily complicated, and whether the design has clear interaction boundaries.
The diagram therefore supports more informed design and refactoring discussions.
UML Composite Structure Diagram Elements and Notations
A Composite Structure Diagram uses several UML elements to describe the internal organization of a classifier. Understanding these elements is important when creating diagrams that are both meaningful and consistent with UML notation.
Structured Classifier
A structured classifier is the containing element whose internal structure is being described.
It provides the context for the parts, ports, and connectors shown in the diagram. A class is a common example of a structured classifier.
The containing classifier represents the whole, while the parts inside it represent the roles or constituent elements that make up its internal structure.
Class
A class can represent a structured element whose internal composition is being modeled.
In a Composite Structure Diagram, the class acts as a container for internal parts and ports. It provides a boundary within which the relationships among those elements can be described.
For example, a PaymentProcessor class might contain parts representing a payment gateway adapter, transaction validator, and payment repository.
Part
A part represents a role played by one or more instances within a containing structured classifier.
Parts describe what makes up the classifier from an internal perspective. A part is commonly displayed using a rectangle with a name and type, such as:
paymentGateway:PaymentGateway
The name before the colon identifies the role, while the type after the colon identifies the classifier of the part.
A multiplicity may also be specified to indicate how many instances can participate in that role.
For example:
engine:Enginerepresents an engine part.sensor:Sensor[4]represents four sensor instances.items:OrderItem[1..*]represents one or more order item instances.
A part does not have to represent a separately owned class in every modeling context. It represents an internal role within the containing structure.
Port
A port is an interaction point on a classifier or part.
It defines where interactions can occur between a classifier and its environment, or between the classifier and its internal parts.
For example, a PaymentProcessor might expose a paymentRequest port through which an external application submits payment requests. Internally, the processor may use another port to interact with a payment gateway.
Ports help make interaction boundaries explicit rather than leaving them implicit in the diagram.
In Visual Paradigm Desktop, a port can be created on a class through the Resource Catalog. Its type can be specified in the Port Specification window.
Connector
A connector represents a link between parts or ports within a structured classifier.
It shows how internal elements are connected and how they can collaborate.
For example, a connector may link an order validation part to an inventory service part, indicating an internal connection between those roles.
Connectors are particularly important when a classifier contains several parts. They make the internal relationships visible and help explain how the parts work together.
Interface
An interface specifies a contract of behavior that a classifier provides or requires.
Composite Structure Diagrams can use the UML ball-and-socket notation to show provided and required interfaces:
- A provided interface indicates services that an element makes available.
- A required interface indicates services that an element needs from another element.
The lollipop notation represents a provided interface, while the socket notation represents a required interface.
This notation helps communicate dependencies and service boundaries without exposing the implementation details behind the interface.
Collaboration
A collaboration describes a set of roles and relationships that work together to accomplish a particular purpose.
Rather than describing every detail of a complete system, a collaboration focuses on the participants and connections needed for a specific goal.
For example, a checkout collaboration might involve roles for an order, payment service, inventory service, and shipping service.
A collaboration can be used to describe a reusable pattern of cooperation between elements. A Collaboration Use can then represent the application of that collaboration within a classifier or operation.
External Part References
A composite structure may also need to show references to objects that are not owned as internal parts of the containing classifier.
Visual Paradigm’s Composite Structure Diagram notation includes ways to represent external part references. In the notation described in Visual Paradigm’s guide, a dashed rectangle can indicate a reference to an external object.
This distinction is useful because an element may depend on an external object without containing or owning that object as one of its internal parts.
Notes and Constraints
Notes and constraints can provide additional information about the internal structure.
For example, a note might explain the responsibility of a particular part, while a constraint can express a condition that applies to the modeled structure.
These annotations help clarify design decisions that may not be immediately obvious from the diagram alone.
Composite Structure Diagram vs. Class Diagram
Composite Structure Diagrams and Class Diagrams are both UML structural diagrams, but they serve different purposes.
A Class Diagram describes classes, their attributes and operations, and relationships such as associations, dependencies, generalizations, and compositions.
A Composite Structure Diagram focuses on the internal organization of a structured classifier. It shows the parts that make up the classifier and the connectors and ports through which those parts interact.
Consider a class named Product.
A Class Diagram might show that Product is associated with Description and Pricing. This communicates that these classes are related, but it may not make clear whether the references are contained within the internal structure of a particular Product instance.
A Composite Structure Diagram can show the internal parts of Product and make the location of those relationships more explicit.
| Aspect | Class Diagram | Composite Structure Diagram |
|---|---|---|
| Main focus | Classes and their relationships | Internal structure of a classifier |
| Primary elements | Classes, attributes, operations, associations | Parts, ports, connectors, collaborations |
| Structural perspective | System or domain-level class relationships | Internal organization of an individual structured element |
| Interaction boundaries | Usually represented through relationships and interfaces | Explicitly represented through ports and interfaces |
| Typical question | What classes exist, and how are they related? | What is this element made of, and how are its parts connected? |
The two diagrams complement each other. A Class Diagram establishes the broader type structure, while a Composite Structure Diagram provides a more detailed view of selected elements.
Composite Structure Diagram vs. Component Diagram
A Component Diagram describes the organization and dependencies of software components. It is commonly used to communicate the modular structure of a system and the dependencies between its larger building blocks.
A Composite Structure Diagram focuses on the internal composition of a structured classifier.
For example, a Component Diagram might show that an order management component depends on payment, inventory, and shipping components.
A Composite Structure Diagram can show how the order management component is internally assembled, which parts it contains, and how those parts are connected.
| Aspect | Component Diagram | Composite Structure Diagram |
|---|---|---|
| Main focus | Software components and their dependencies | Internal composition of a structured classifier |
| Typical scope | System and subsystem architecture | Detailed internal structure |
| Main elements | Components, interfaces, ports, dependencies | Parts, ports, connectors, collaborations |
| Main question | What are the major software components and how do they depend on one another? | What internal parts make up this element, and how are they connected? |
Use a Component Diagram when communicating the modular architecture of a system. Use a Composite Structure Diagram when the internal organization of a particular classifier needs closer examination.
Create a Composite Structure Diagram in Visual Paradigm Desktop
Visual Paradigm Desktop provides a dedicated editor for creating UML Composite Structure Diagrams. You can create a diagram, add a class, define its internal parts and ports, and connect the elements to describe the internal structure.
The following workflow introduces the main diagramming operations.
Create a new Composite Structure Diagram
To start modeling:
- Select Diagram > New from the application toolbar.
- In the New Diagram window, select Composite Structure Diagram.
- Click Next.
- Enter the diagram name and description.
- Choose the model location in which the diagram should be stored.
- Click OK.
Visual Paradigm creates the new Composite Structure Diagram and opens its editing canvas.
Create a class
The class provides the structural context for the internal parts and ports.
To create a class:
- Click Class on the diagram toolbar.
- Click on the diagram canvas to place the class.
- Enter or edit the class name.
For example, create a class named ComputerSystem to represent the computer system whose internal structure you want to model.
Create a part inside a class
Parts represent the internal roles that make up a structured classifier.
To create a part inside a class:
- Move the mouse pointer over the class.
- Click the Resource Catalog button that appears.
- Select New Part from the Resource Catalog.
- A new part is created inside the class.
- Enter the part name and specify its type as appropriate.
For example, a ComputerSystem might contain parts such as powerSupply, mainboard, hardDrive, and memory.
You can repeat this operation to add the internal parts needed to describe the structure.
Create a port on a class
Ports define interaction points on a class or structured classifier.
To create a port:
- Move the mouse pointer over the class.
- Click the Resource Catalog button.
- Select New Port from the Resource Catalog.
- A port is created on the class.
The port can then be used to represent an interaction point between the classifier and its environment or its internal structure.
Specify the type of a port
A port can be associated with a classifier type to describe the type of interaction point being modeled.
To specify a port type:
- Right-click the port.
- Select Open Specification… from the popup menu.
- In the Port Specification window, locate the Type field.
- Select a class as the port type.
- Click OK to apply the changes.
The selected type is displayed in the port caption.
This allows the diagram to communicate more than the existence of an interaction point: it also identifies the classifier type associated with that port.
Create a connector
Connectors show how parts and ports are linked within the structured classifier.
To create a connector:
- Click Connector on the diagram toolbar.
- Drag from the source shape.
- Move the mouse pointer over the target shape.
- Release the mouse button to create the connector.
Continue adding connectors to represent the internal relationships required by the design.
For example, a connector can link a mainboard part to a memory part, or connect an internal service part to another part through an appropriate port.
Complete and refine the diagram
After adding the main structural elements, review the diagram to make sure that its internal organization is clear.
Consider the following:
- Give parts meaningful role names.
- Specify part types where they help clarify the design.
- Add ports where interaction boundaries need to be shown.
- Use connectors to represent the intended internal links.
- Include interfaces when provided and required services need to be communicated.
- Arrange elements to make the internal structure easy to follow.
- Add notes or constraints when additional explanation is needed.
A useful Composite Structure Diagram should communicate the organization of the classifier without requiring readers to infer important internal relationships.
Practical Composite Structure Diagram Examples
Composite Structure Diagrams are useful whenever a complex element is composed of smaller collaborating elements. The following examples illustrate common modeling situations.
Computer System
A computer system is a natural example of a composite structure.
A ComputerSystem classifier might contain the following parts:
powerSupply:PowerSupplymainboard:MainboardhardDrive:HardDriveopticalDrive:OpticalDrivememory:MemoryModule
The diagram can show how these parts are connected within the computer system. The mainboard may connect to memory and storage devices, while the power supply provides power to the relevant internal elements.
This model helps explain the internal composition of the computer as a structured whole.
Online Shopping Order Processing
An order processing class may contain several internal parts responsible for different aspects of order fulfillment.
For example:
validator:OrderValidatorinventory:InventoryServicepayment:PaymentProcessorshipping:ShippingCoordinator
Connectors can show how these parts are linked within the order processing structure.
Ports can represent interaction points through which an external application submits an order or receives an order status.
This diagram is useful when explaining how the internal responsibilities of an order processing element are distributed.
Payment Processing
A payment processing classifier may contain parts such as:
requestHandler:PaymentRequestHandlerriskChecker:FraudCheckergateway:PaymentGatewayAdaptertransactionStore:TransactionRepository
The diagram can show how a payment request enters the processor, how internal parts are connected, and where external payment services are accessed.
Interfaces can describe the services provided by the payment processor and the services it requires from external systems.
This is especially useful when reviewing integration boundaries and the responsibilities of internal payment-related elements.
Smart Home Controller
A smart home controller may coordinate several internal parts:
deviceManager:DeviceManagersensorHub:SensorHubautomationEngine:AutomationEnginenotificationService:NotificationService
Ports can define how the controller interacts with external devices or user applications. Connectors can show the internal links between the sensor hub, automation engine, and notification service.
The diagram provides a clear view of how the controller is internally organized to coordinate different smart home capabilities.
Vehicle Control System
A vehicle control system may contain parts representing:
engineController:EngineControllerbrakeController:BrakeControllersensorSystem:SensorSystemdiagnosticUnit:DiagnosticUnit
The diagram can show the internal structure of the control system and the connections between its parts.
This is useful for discussing the internal organization of a complex control element without attempting to represent every detail of the complete vehicle architecture in one diagram.
Customer Authentication
An authentication component may contain parts such as:
credentialValidator:CredentialValidatoridentityProvider:IdentityProvidersessionManager:SessionManagerauditLogger:AuditLogger
The diagram can show how the authentication component is internally composed and how its parts are connected.
Ports and interfaces can help clarify how the component interacts with external applications and identity services.
Use Composite Structure Diagrams with Other UML Diagrams
A Composite Structure Diagram is most useful when it is considered as part of a broader UML model. Different UML diagrams describe different views of a system, and combining them helps communicate the design at multiple levels of detail.
Use Case Diagram
A Use Case Diagram describes the services a system provides to external actors.
A Composite Structure Diagram can provide a more detailed structural view of the internal classifier responsible for realizing a particular use case.
For example, a payment-related use case may be supported by a payment processing classifier whose internal parts are documented in a Composite Structure Diagram.
Class Diagram
A Class Diagram defines the classes and relationships that form the static structure of a system.
A Composite Structure Diagram can provide a closer view of selected classes, showing their internal parts, ports, and connectors.
Use the Class Diagram to establish the overall type structure, then use Composite Structure Diagrams to explain the internal composition of complex classifiers.
Sequence Diagram
A Sequence Diagram shows how participants exchange messages over time to realize an interaction.
A Composite Structure Diagram shows the internal parts and connections that can support those interactions.
For example, a Sequence Diagram might show a payment request passing through several participants. A Composite Structure Diagram can show how the payment processing classifier is internally organized around the relevant roles.
Communication Diagram
A Communication Diagram emphasizes the structural relationships between participants involved in an interaction and the messages exchanged between them.
A Composite Structure Diagram provides a related but different view: it describes the internal parts and connections of a structured classifier.
Together, these diagrams can help explain both the organization of internal elements and their participation in an interaction.
Component Diagram
A Component Diagram describes software components and their dependencies.
A Composite Structure Diagram can drill into a particular structured element to show its internal organization.
This combination is useful when moving from a high-level component architecture to a more detailed design of a selected component or classifier.
Deployment Diagram
A Deployment Diagram shows the physical deployment environment of a system, including nodes and deployed artifacts.
A Composite Structure Diagram describes logical internal organization rather than physical deployment.
Using both diagrams can help teams distinguish how software is internally structured from where it is deployed.
Benefits of Using Visual Paradigm Desktop for Composite Structure Diagram Modeling
Visual Paradigm Desktop provides a dedicated modeling environment for creating Composite Structure Diagrams and incorporating them into a broader UML model.
Dedicated Composite Structure Diagram editor
The dedicated editor provides the modeling canvas and diagram elements needed to describe the internal structure of a classifier.
You can create classes, parts, ports, and connectors as part of a focused structural model.
Resource Catalog for efficient modeling
The Resource Catalog provides a convenient way to create related elements directly from an existing class.
For example, you can use it to create a new part or port without having to start the operation separately from the diagram toolbar.
This supports an incremental modeling workflow in which the internal structure can be built up as the design develops.
Port specification
Visual Paradigm allows you to open a port’s specification and assign a class as its type.
This makes it possible to describe the type associated with an interaction point directly in the model.
Visual representation of internal connections
Connectors make relationships between internal elements visible.
This helps teams understand how the parts of a classifier are connected and discuss the internal structure more effectively.
Integration with broader UML modeling
Composite Structure Diagrams can be used alongside Class, Sequence, Communication, Component, Deployment, and other UML diagrams.
This allows the internal organization of a classifier to be understood in the context of the overall system model.
Support for collaborative design communication
A visual representation of internal structure gives developers, architects, and other stakeholders a shared reference for technical discussions.
Instead of relying only on written descriptions, teams can review the same diagram when discussing responsibilities, dependencies, and interaction boundaries.
Best Practices for Creating Effective Composite Structure Diagrams
A useful Composite Structure Diagram should provide enough detail to explain the internal organization without becoming unnecessarily complicated.
Model a clear structural scope
Choose a specific class or structured classifier as the subject of the diagram.
Avoid trying to describe the internal structure of too many unrelated elements in one diagram. If the model becomes difficult to read, consider creating separate diagrams for different classifiers or areas of responsibility.
Give parts meaningful names
Part names should communicate the roles they play within the containing classifier.
Names such as paymentGateway, orderValidator, and inventoryManager are generally more informative than generic labels such as part1 or moduleA.
Distinguish parts from their types
A part represents a role within the containing classifier, while its type identifies the classifier of the instances that play that role.
Use this distinction consistently. For example, gateway:PaymentGateway makes the role and its type clear.
Use ports to clarify boundaries
Ports are useful when an interaction point needs to be made explicit.
Use them to distinguish the ways a classifier interacts with its environment from the internal connections between its parts.
Avoid adding ports that do not contribute meaningful information to the model.
Show only relevant connectors
Connectors should communicate important internal links.
If every possible relationship is shown without regard to the diagram’s purpose, the result may become difficult to interpret. Focus on the connections that explain the structure being modeled.
Use interfaces to communicate service contracts
When the services provided or required by a part are important to understanding the design, use interfaces to make those contracts visible.
This can clarify dependencies without requiring readers to inspect implementation details.
Keep the diagram readable
Arrange parts and connectors to minimize unnecessary crossings and make the structure easy to follow.
Use notes where additional explanation is needed, rather than placing lengthy descriptions inside every element.
Maintain consistency with related diagrams
Keep the names and types of classifiers consistent with the rest of the UML model.
When a Composite Structure Diagram describes a class already represented in a Class Diagram, ensure that the model communicates the same design intent across both views.
Frequently Asked Questions
What is a Composite Structure Diagram used for?
A Composite Structure Diagram is used to describe the internal structure of a class or other structured classifier. It shows the parts that make up the classifier, the ports through which interactions occur, and the connectors that link internal elements together.
What is the difference between a part and a class?
A class defines a type, while a part represents a role played by one or more instances within a containing structured classifier.
For example, gateway:PaymentGateway identifies a part named gateway whose type is PaymentGateway.
What is a port in a Composite Structure Diagram?
A port is an interaction point on a classifier or part. It defines where interactions can occur between the classifier and its environment or between the classifier and its internal parts.
What is a connector in a Composite Structure Diagram?
A connector represents a link between parts or ports within a structured classifier. It shows how internal elements are connected and can collaborate.
What is the difference between a port and an interface?
A port defines an interaction point. An interface defines a contract of behavior that an element provides or requires.
A port can be associated with interfaces to describe the services available or needed at that interaction point.
What is the difference between a Composite Structure Diagram and a Class Diagram?
A Class Diagram focuses on classes, their attributes and operations, and relationships between classes. A Composite Structure Diagram focuses on the internal parts and connections of a structured classifier.
The Class Diagram describes the broader type structure, while the Composite Structure Diagram provides a more detailed view of a selected element’s internal organization.
What is the difference between a Composite Structure Diagram and a Component Diagram?
A Component Diagram describes software components and their dependencies at an architectural level. A Composite Structure Diagram describes the internal parts and connections of a structured classifier.
The two diagrams complement each other when documenting both the modular architecture and the internal organization of a particular element.
Can a Composite Structure Diagram show external dependencies?
Yes. A Composite Structure Diagram can represent references to external objects and show how the containing classifier relates to elements outside its internal composition. Visual Paradigm’s Composite Structure Diagram guide describes a dashed-rectangle notation for external part references.
Can I specify the type of a port in Visual Paradigm Desktop?
Yes. You can right-click a port, select Open Specification…, and choose a class in the Type field of the Port Specification window.
How do I create a part in Visual Paradigm Desktop?
Move the pointer over the class, click the Resource Catalog button, and select New Part. Visual Paradigm creates a part inside the class.
How do I create a connector in Visual Paradigm Desktop?
Select Connector from the diagram toolbar, drag from the source shape to the target shape, and release the mouse button to create the connector.
Which Visual Paradigm Desktop editions support Composite Structure Diagrams?
According to Visual Paradigm’s current Desktop edition comparison, Composite Structure Diagram modeling is supported in the Community, Modeler, Standard, Professional, and Enterprise editions.
The available capabilities of other tools and advanced features may vary by edition. Refer to the official edition comparison for the latest details.
License and Availability
The UML Composite Structure Diagram editor is available in Visual Paradigm Desktop. The current edition comparison lists Composite Structure Diagram support in all five Desktop editions: Community, Modeler, Standard, Professional, and Enterprise.
Visual Paradigm Community Edition is available for non-commercial use. Users who need Visual Paradigm for commercial work should review the applicable commercial edition and licensing terms.
For the latest edition details, please refer to the Visual Paradigm Editions Comparison and Visual Paradigm Pricing pages.
Model Internal Structures with Visual Paradigm Desktop
A complex class or component is often more than a single box in a system model. Its internal parts, interaction points, and connections can have a significant impact on how the design is understood and implemented.
With Visual Paradigm Desktop’s Composite Structure Diagram editor, you can represent these details visually, define the roles played by internal parts, specify ports, and connect the elements that make up a structured classifier.
Use Composite Structure Diagrams together with Class, Component, Sequence, and other UML diagrams to communicate both the overall design and the internal organization of important system elements.
Explore Visual Paradigm Desktop and create UML Composite Structure Diagrams to make complex internal designs easier to understand and communicate.