Apama 10.15.0 | Developing Apama Applications | Developing Apama Applications in EPL | Defining Monitors | About monitor contents | Terminating monitors
 
Terminating monitors
A monitor instance terminates when one of the following events occurs:
*The monitor instance executes a die statement in one of its actions.
*A runtime error condition is raised.
*The monitor is terminated externally (for example, with the engine_delete utility). When the correlator deletes a monitor it terminates all instances of that monitor.
*The monitor instance has executed all its code and there are no active event or stream listeners. This will occur rapidly if the monitor's onload() action does not create any listeners. See also Beware of accidental stream leaks.
When a monitor instance terminates, the correlator invokes the monitor's ondie() action, if it is defined. You cannot spawn in an ondie() action.