Signals
Defining a Signal
A signal is an event that can be explicitly invoked. A signal can have parameters. A signal can be sent to an object or set of objects. It can be invoked as part of the participation of an actor in a use case.
A message can be sent or received by a class. It can also be sent by an operation after an exception.
Specifying Class Signals
Creating a sent or received signal
To specify what signals can be sent or received by a class:
1. Select the class concerned and display its properties.
2. In the properties window, click the drop-down list and select Complements.
3. In the menu tree presented, select sentSignal or receivedSignal then click Add.
4. Indicate the name of the signal and click OK.
Signal Properties
To open the properties dialog box of a signal:
button displays the hidden commands.The Properties dialog box of the signal appears.
You can indicate for a signal:
• Its Stereotype to specify its use:
• Exception: an error signal is generated when an exception occurs during the execution of an operation.
• Its Visibility related to the package:
• Public: this is the default visibility. The signal is visible to any element outside the package.
• Protected: the signal is visible to inherited elements or friends.
• Private: the signal is visible to its class or to its friends.
• The ExpressionType of the signal (see expression type).
A signal can be a request to Vote sent to each active object, asking if it is possible to perform a specific action such as closing a Windows session.
A signal can be a general Broadcast to all active objects.
Signal parameters
The Parameters of the signal are specified in the Parameters tab of its Properties dialog box. You can specify:
• The operation ExpressionType, eg. Example: Integer(5).
• Its Default Value. Example: 0.
• Its Direction: at input and/or output of the operation.