Home | Table of Contents | Universal Event Listeners | CloverETL 4.6.1
--- | --- | ---
Prev | Listeners | Next

## Universal Event Listeners

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.5. 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: No failover: Just one node ID specified - Only the specified node performs the Groovy code, however node status must be "ready". When the node isn't ready, code isn't performed at all. Failover with node concurrency: No node ID specified (empty input) - All cluster nodes with status "ready" concurrently perform Groovy code. So the code is executed on each node in the specified interval. Failover with node reservation: More node IDs specified (separated by comma) - Just one of specified nodes performs groovy code. If the node fails from any reason (or its status isn't "ready"), any other "ready" node from the list continues with periodical groovy code processing. 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.

### Groovy code

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

Prev | Up | Next
JMS Messages Listeners | Home | Table of Contents | Evaluation Criteria