For the list of all supported Decision Insight downloads and releases, see the Downloads page.

Notification route configuration

For your notification to work, you must use a route to send out your alerts to the outside world. To do this, your route will also connect to a DIMS notification event.

Prerequisite : Notifier configuration

Usage

The notifiers are called by the tnd-notifier  component that can only be used as a producer.

<from uri="tnd-notifier:..."/>

Notifications only process live events

In case of a node restart with catchup, notifications are not replayed. Should a notification's action be replayed, it is recommended to use an intermediate resilient system.

For instance, the route listening to the notifier could send a message containing all the notifier data through a DIMS topic, and you could have another another route listening to this topic to fire the desired action.

URI format

tnd-notifier:notifierName[?option]

URI options

Name Default value Description
secureMode true Whether or not we authorize to use a non-secured DIMS (without TLS communication)

Message format

The notifier content will be contained in the message body and identified by its keys.

Here is an example of a message body

{ 
    "_key" :  "ALERT_01_AB" , 
    "_name" :  "My Notification 01" , 
    "_type" :  "RAISE" , 
    "_data" : { 
        // All context data from the query 
    }, 
   //fields below this point are defined by the notifier, and valued by the notification
   "recipient" :  "admin@mycompany.com" ,
   "subject" :  "WARNING - Overload detected" ,
   "message" :  "The payments count 6150 is exceeding the limit (previously 4500)! (Current total payment amount 150 000)"
}


Property Description
_key The string key of the notification, can be used as reference on external system
_name The string name of the notification
_type The type of the notification as string, can be either "RAISE" or "CLEAR"
_data An object containing the queried values from the context + the classifier, it's a flat map like in triggers
<other> Other entries will use the keys of the notifier + their corresponding string value from the notification

Example

Example of a notifier named 'SendMail' used in a route using the camel-mail library:

<from uri="tnd-notifier:SendMail"/>
<setHeader headerName="subject">              
	<simple>${body.subject}</simple>
</setHeader>
<setHeader headerName="to">             
	<simple>${body.recipient}</simple>
</setHeader>
<setBody>           
	<simple>${body.message}</simple>
</setBody>
<to uri="smtp://{{SMTP_SERVICE}}?username={{user}}&amp;password={{pass}}"/>



Related Links