UML specifies three symbols that determine the recipient of the message as parameter expression. The recipient is the so-called assignment target of the message. The response message assigns it the response value from the sender's output parameter. These are the standardized symbols:
- Unknown
- Interaction parameter
- Attribute
Unknown is an empty parameter and stands for the wildcard. The interaction parameter is an owned parameter of the interaction to which it is inherent. This means that the interaction has the parameter. This has a name. Operation and interaction parameters have the same type. Attributes can be named without restrictions. They represent the name of a context behavior. This behavior determines either the lifeline to which the message returns or the surrounding interaction. If the interaction does not determine any behavior, it acts as context itself.
Gates are simply points at the end of a message. They belong to type MessageEnd. It marks the sender and recipient of a message. Gates illustrate the flow of information and show how messages move between two interaction fragments. More precisely, they represent connection points for messages between interaction benefits and interactions – and between interaction operands within and outside of a combined fragment.
The UML sequence diagram recognizes four types of gates. They differ in the fragments of interaction with which they are associated:
- The actual gateway: Interaction benefits point from one diagram to another. The actual gate opens the connection at the outer edge of the interaction benefit for messages from the interaction to which the interaction benefit refers. The gate has an association to the interaction benefit and accepts incoming and outgoing messages.
- The formal gate: For an interaction to exchange messages with an interaction benefit, it needs a formal gate. The gate is located on the inside of the frame.
- Inner CombinedFragment gate: Within a combined fragment, there is a gate on the frame. It exchanges messages with message ends from the combined fragment with messages with message ends outside the combined fragment.
- Outer CombinedFragment gate: This gate sits on the outer edge of a combined fragment. It forms the opposite pole to the inner gate.
Gates can have explicit or implicit names that must match in pairs. Actual and formal gates must match, as must inner and outer gates for combined fragments. In addition, the messages must go in the same direction and have the same property values and the same MessageSort.
Messages in communication diagrams play a special role. This diagram type is a simple form of the sequence diagram. Communication diagrams model how lifelines interact. Unlike sequence diagrams, they focus on the system architecture and how it determines the flow of messages. Although you can show a detailed architecture, interaction fragments such as combined fragments do not use them. As a result, a force element is missing. Instead, number the messages. Sometimes messages can overtake others. The sequence of outgoing messages then differs from the sequence of incoming messages. However, the UML standard advises against such non-sequential messages in the communication diagram.
The UML notation for communication diagrams prescribes a simple sequence diagram frame. A rectangle with a pentagonal label in the head. In the label, the designation “sd” marks this diagram type. Next to it, note the interaction name. Messages take a different form here – they connect the rectangular lifelines (UML: object nodes) as simple straight lines (UML: edges).
Above this, note the sequence expression, together with an arrow pointing in the direction of the receiver. The sequence name has the following form: [Integer name][Repetition]. The integer specifies the hierarchy for nested elements. If one of the integers (for example 1.2.2 and 1.2.3) differs in two messages, the system sends them one after the other. The name, on the other hand, stands for simultaneous broadcasts. The system sends two messages with the sequence names 1.2.3a and 1.2.3b simultaneously because of the identical integer. The repetition contains either a restriction that determines when the message is sent or a value that determines how often the message is repeated.