Skip to content

Component Connector (Assembly and Delegation)

A connector is a link between parts in a component design. UML defines two kinds: assembly and delegation. (For the basics of components, see UML Component Diagram. For ports, see Port.)

Assembly connector. It joins two or more parts, or ports on parts. Some parts provide services, and other parts use them.

Delegation connector. It links the external contract of a component to the inner parts that realize that behavior. The contract is expressed through the component’s ports. Outsiders see only the port. The work happens inside, in a part.

How the kind is decided. The kind is derived from where the ends attach. If an end attaches to a port that is not on a part, and is not a behavior port, the connector is a delegation. Otherwise it is an assembly.

Compatibility. The elements at both ends must be compatible. When one end requires certain interface features, the other end needs compatible provided features. See Provided and Required Interface for these terms.

Instances, not classes. Connectors specify links only between the instances that play the connected parts. They do not state a general relationship between classes.

In arc42. The building block view shows the static decomposition of a system into building blocks. Connectors can show how those blocks interact. arc42 gives no interface template. Examples or simple signatures usually suffice.

An “Order Service” component has an outer port named “orders”. Inside it sit two parts: “Order Handler” and “Price Calculator”.

  • A delegation connector runs from the “orders” port to “Order Handler”. Callers use the port. The handler does the work.
  • An assembly connector joins “Order Handler”, which uses prices, to “Price Calculator”, which provides them.

Connectors describe links between instances playing parts, so they do not replace class-level relationships. Because the kind is derived from where the ends attach, a misplaced end silently changes a delegation into an assembly. Since arc42 gives no interface template, teams must agree on how much interface detail to show.

Delegation from an outer port to an inner part, and an assembly connector between two inner parts.

Diagram source
@startuml
component "Order Service" as OS {
portin orders
component "Order Handler" as OH
component "Price Calculator" as PC
}
orders --> OH : delegate
OH --( PC : assembly
@enduml
  • Each delegation connector runs from a port on the component boundary to an inner part that realizes the behavior.
  • Each assembly connector joins a part that provides a service to a part that uses it.
  • The elements at both ends of every connector have compatible interface features.