Developing Apama Applications > Apama EPL Reference > Monitors > Monitor actions > SimpleActions
SimpleActions
A simple action has a name and a body consisting of a block. The body contains the executable code of the action. There are no parameters.
SimpleAction
Rule components
The action names onload(), onunload(), ondie(), onBeginRecovery(), and onConcludeRecovery() are special. These actions are invoked automatically when certain events in a monitor’s life cycle occur.
A block must follow the action name. Note that there are no formal parameters in this form of action definition and the action cannot return a value.
About onload()
The onload() action is invoked immediately after a monitor has been loaded. This action must be present in every monitor.
About ondie()
The ondie() action, if present, is invoked by the correlator when a monitor instance terminates.
About onunload()
The onunload() action, if present, is invoked by the correlator after all instances of a monitor have terminated, just before the last monitor instance is unloaded.
About onBeginRecovery()
The onBeginRecovery() action, if present, is invoked by the correlator during recovery of a persistence-enabled correlator. The correlator executes onBeginRecovery() on monitors and any live events after it reinjects source code and restores state in persistent monitors.
About onConcludeRecovery()
The onConcludeRecovery() action, if present, is invoked by the correlator during recovery of a persistence-enabled correlator. The correlator executes onConcludeRecovery() on monitors and any live events before it begins to send clock ticks.
Copyright © Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its Subsidiaries and or/its Affiliates and/or their licensors.
Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG.