Notify triggers

The Expressions extension can be used to trigger notify operations if certain conditions are met. The triggers can be bound to state changes or specific patterns, such as periodically triggered events. You can also specify conditions for a triggered notify to be fired or not.

The svc_expr service can be specified as a client only on notify operations.

Note: There is no support for solicit/response operations, since the use cases this might cover are more clearly handled by notify/consume combinations.

A notify operation can be triggered either on state changes or based on a predefined pattern. Triggering a notify operation does not mean a notify event is actually fired.

Table 1. Trigger expression evaluation
Trigger condition Description
State change The notify is triggered as soon as a state variable exceeds a threshold. State variables can be changed by request/reply, consume/reply or consume operations.
Automatic The notify operation is automatically triggered once or any number of times based on a predefined pattern.

For example, the notify is triggered every 5 minutes for a total of 3 times.

When a notify is triggered, the expressions in its svc_expr property are evaluated. A notify is fired if either of the following conditions is met.

Table 2. Fire event
Fire condition Description
Last expression in expr.src is true A notify operation is fired if the last expression in the expr.src property evaluates to the atom true.
No expr.src is defined If no expr.src property content is supplied, then the Expression service by default returns the atom true and the triggered notify is fired.