Since 2.10
Universal Event Listeners allow you to write a piece of Groovy code that controls when an event is triggered, subsequently executing a predefined task. The Groovy code is periodically executed and when it returns TRUE, the task is executed.
Table 24.6. Attributes of Universal message task
Attribute | Description |
---|---|
Node IDs to handle the event |
In the Cluster environment, each universal event listener has a "Node IDs" attribute which may be used for specification which cluster node will perform the Groovy code. There are following possibilities:
In standalone environment, the "Node IDs" attribute is ignored. |
Interval of check in seconds | Periodicity of Groovy code execution. |
Groovy code | Groovy code that evaluates either to TRUE (execute the task) or FALSE (no action). See below for more details. |
A piece of Groovy is repeatedly executed and evaluated; based on the result, the event is either triggered and the task executed or no action is taken.
For example, you can continually check for essential data sources before starting a graph. Or, you can do complex checks of a running graph and, for example, decide to kill it if necessary. You can even call the CloverETL Server core functions using the ServerFacade interface, see Javadoc: http://host:port/clover/javadoc/index.html