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 © 2013 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or Terracotta Inc., San Francisco, CA, USA, and/or Software AG (Canada) Inc., Cambridge, Ontario, Canada, and/or, Software AG (UK) Ltd., Derby, United Kingdom, and/or Software A.G. (Israel) Ltd., Or-Yehuda, Israel and/or their licensors.