Triggered operations

A triggered operation is a synchronous event that can return a value. It is a synchronous communication between objects that can be invoked by one object to trigger a state transition in another object. The body of the triggered operation is executed as a result of the transition. Because a triggered operation is synchronous, the sending object must wait for it to return before the sender can continue on its own thread.

The body of a triggered operation is set in the statechart of the receiving object by the action language associated with a transition. Thus, the body of the same triggered operation can be different based on the state of the object when the operation is invoked. To return a value from a triggered operation, use the RiCREPLY(VALUE) macro as one of the action statements associated with the triggered operation. See Predefined actions for more information about the REPLY macro.


Feedback