This method marks all events targeted for the specified OMReactive instance as canceled (that is, it changes the IDs of the events to Constants).
You might want to use the cancelEvents method if, for example, there are several events in the event queue targeted for a specific OMReactive instance, but the instance has already been destroyed because it reached a termination connector in the statechart.
The cancelEvents method works in the following way:
Public
virtual void cancelEvents(OMReactive* destination);
destination
Specifies an OMReactive instance
In the framework, cancelEvents is virtual to support enhanced framework customization. It can also support several event queues per task.