Once the Activities Entry, Exit, and Do Activity of a State have been specified with a Behavior that has input parameters, a signal, which triggers objects to change the State, can carry values to the input parameters. 

In order to send the signal to the target object, an instance of the signal will be created. The signal instance can contain the values of its structural features. These values will be propagated to the parameters of the Behavior specified at the Entry, Exit, and Do Activity when the two following conditions are met

  • The number and order of properties of the signal must be the same as the number and order of parameters in the Behavior. 
  • The type, the order (isOrdered), and the multiplicity of each property of the signal must be the same as the corresponding parameter of the Behavior. If the type of signal properties are Subtype of the parameter type, it is considered a match. 

If one of the two conditions is not satisfied, a warning will appear once the model is validated by pre-simulation constraints before the simulation starts. 

A send signal Action in an Activity can create a signal instance with the values of its structural features. For example, the signal MySignal shown in the following figure. It contains three properties: attrib1, attrib2, and attrib3. They are created with Real, String, and Boolean respectively. 

A Signal with Three Properties
A Signal with three properties.

The following figure shows the order of the three signal attributes


Arguments of MySignal Signal
The arguments of MySignal signal.

To create the signal Instance of MySignal that contains the values of attrib1, attrib2 and attrib3, a send signal Action must be created with three argument pins as shown in the following figure. The order and types of the pins must match the order and type of the signal properties, therefore the first pin must be typed by Real, the second by String, and the third by Boolean. 

Send Signal Actions with Three Arguments
Send signal Actions with three arguments.
 

Now that the pins of the send signal Action have been created, you can specify the values of the signal Instance through them (see the following figure). The figure shows the value specification Actions that are used to create the values and add them to the pins of the send signal Action. 

Creating Values for Argument and Parameters of MySignal
Creating values for argument and parameters of MySignal.

At this point, the signal Instance created by the send signal Action in the Send Signal Actions with three arguments figure, will be sent to the context object of Activity A. The signal Instance contains 12.34Hello World, and true as the values of attrib1, attrib2, and attrib3 respectively. You can get more information on State Machine simulation and Activity simulation in sections State Machine simulation and Activity simulation respectively. 

Details of Untitled1 Statemachine 
Details of the State Machine diagram.

In a State-Machine simulation, the state of an object will change if it receives a send signal instance. Behaviors that are specified at the entry, do Activity, and exit of the State will be invoked in the State transition. The values that come with the signal instance will be delivered to the parameters of the behaviors. For example, prior to receiving a signal, an object is in State1, however, it will move to State2 once it has accepted the signal. The Behaviors to which the values of the signal Instance will be delivered, are the Behaviors specified at Exit of State1, Entry and Do Activity of State2. 

In the following figure, the object has accepted the signal Instance, that is MySignal, and it will move from State1 to State2. A performOnEntry activity, which is the entry Activity of State 2 will be simulated. The performOnEntry Activity contains three parameters which are param1, param2, and param3. They are typed by Real, String, and Boolean respectively. 

Details of performOnEntry Activity
Details of the performOnEntry Activity.

You can see the order of the parameters. The values that come with the signal Instance of MySignal will be delivered to these parameters. In this example, the value of attrib1 will be propagated to param1, the value of attrib2 will be propagated to param2, and the value of attrib3 will be propagated to param3. The values of param1, param2, and param3 are "12.34", "Hello World", and "true" respectively. 

Arguments of performOnEntry Activity

Arguments of the performOnEntry Activity.