Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Associations between components in UML Component Diagrams

Tags:

uml

components

Suppose that I am designing a distributed application:

It is composed by one host, that is the frontend web service of the company (CompanyWS), and one or more hosts, say three, that are the distributed warehouses of the company. Each warehouse is a web service (WarehouseWS) and provides one interface, for instance IWarehouse.

Well, because a UML component

[...]represents a modular part of a system, that encapsulates its content and whose manifestation is replaceable within its environment. A component defines its behavior in terms of provided and required interfaces

the web services can be seen as components.

In a UML Component Diagram how can I express the semantic that the CompanyWS can be plugged to one or more WarehouseWS? Is an association between the components the right way?

Link to what has been done-Component Diagram

like image 604
user2627331 Avatar asked Jan 28 '26 11:01

user2627331


1 Answers

In the UML 2.4.1 Specification it is possible to use ports with multiplicity between components. See page 188, OMG Unified Modeling LanguageTM (OMG UML), Superstructure, Version 2.4.1

So you could define the Warehouse Port (wp) with cardinality [0..1] and the provided interface IWarehouse on component WareHouseWS. On the Component CompanyWS you define the Company Port (cp) with cardinality [0..*] and the required interface IWareHouse.

wp : IWarehouse [0..1]

cp : IWareHouse [0..*]
like image 154
thommy Avatar answered Jan 31 '26 01:01

thommy