Ports in capsule-based UML models

Ports are attributes of a capsule. All part instances of a given capsule will have the same ports available, so you do not need to add ports to specific capsule parts.

In this version, a protocol pattern usage in a structure diagram can be examined. If you are delegating the connection to another port, provided that both ports are typed to the same protocol collaboration, then you can create a delegating connector between the ports.

To create a proper assembly where one port sends, not delegates, an event and another port receives it, each connected port type must be able to receive all the events the other port type can send. The simplest way to do this is using conjugation. If the isConjugate property is true, the port reverses the required and provided interfaces on the collaboration.

The UML ports have an isBehavior property which specifies whether events arriving at that port are terminated there and handled by the owning classifier. A behavior port therefore translates to the point where the event is processed by the owning classifier's behavior, for example a State Machine. When a port is non-behavior, it essentially relays the events along the other connectors connected to that port. This relaying of events continues until a behavior port is reached. When using the Find Connected Port menu action, you will be prompted with an option to Traverse relay ports:

You can also use a symmetrical collaboration protocol, where the base and conjugate interfaces are the same, or the interface operation signatures match completely. In this case, there is no need for a conjugate port on one end because they match in all cases.


Feedback