MagicDraw allows for displaying the messages when leaving or entering a sequence diagram, interaction use, or combined fragment. The Gate is a connection point for representing a message from the outside to the current sequence diagram, interaction use, or combined fragment.
Gates can be used in three cases:
- For passing and returning arguments to InteractionUse, which calls some Interaction.
- For displaying “exceptions“ as messages that stops an interaction execution and leaves it.
- For “calling“ sequence blocks represented as CombinedFragments.
Gate has no notation. Gates are created as message ends when drawing messages to/from a diagram frame, an interaction use, or a combined fragment.
To create a formal gate, do one of the following
- Draw a call, send, create, or delete a message from the diagram frame.
- Draw a reply message to the diagram frame.
- Draw a call, send, create, or delete a message from the combined fragment (inside combined fragment).
You can view the created gates of message in the Message Specification window. In the Send Event list box you can see a formal gate. The Receive Event lists the actual gate.
- The Gate uses text from the message as an identification name. For example, a message name or a message operation.
To draw create an actual gate of the formal gate, do one of the following
- Draw a call, send, create, or delete a message to the interaction use, which refers to the diagram with the formal gates. The Select Formal Gate dialog opens.
- Draw a reply message from the interaction use, which refers to the diagram with the formal gates. The Select Formal Gate dialog opens.
- Draw a call, send, create, or delete a message to the combined fragment (outside combined fragment). The Select Formal Gate dialog appears.
You can also view the formal and actual gates in the gates Interaction Specification window, Interaction Use dialog, Combined Fragment dialog, and the Actual Gates and Formal Gates panes.
To select a formal gate for the actual gate
- Do one of the following:
- Draw a message.
- From the message shortcut menu, choose Select Formal Gate.
- In the open dialog, select one of the listed formal gates and click OK. An actual gate is created.
The Select Formal Gates command is available only if there are formal gates.