Skip to content

Latest commit

 

History

History
executable file
·
125 lines (108 loc) · 6.68 KB

notifications.md

File metadata and controls

executable file
·
125 lines (108 loc) · 6.68 KB

IKASAN

Ikasan Visualisation Dashboard Business Stream Notifications

The Ikasan Visualisation Dashboard supports email notifications. Users and support staff are notified of the exclusion of business stream events. Notifications are configurable and are fired on a scheduled basis. When a notification job is fired, the notification service queries the Ikasan index to determine if there are any exclusions relating to the business stream. If exclusions are found the following Business Stream Model is made available to the Thymeleaf template engine in order to render the notification email content.

Configuring visualisation dashboard notifications

Name Description
jobName Each individual notification must provide a job name to be registered with the scheduler.
emailBodyTemplate A Thymeleaf template used to render the email notification content. This can be either a text or html format.
emailSubjectTemplate A Thymeleaf template used to render the email notification subject. This can be a text format ONLY.
businessStreamName The name of the business stream for which we are raising the notification for.
recipientList A list of email addresses to whom the emails will be sent.
cronExpression The quartz cron expression used by the scheduler to fire the notification events.
isHtml A boolean flag to indicate if the email body contains html content or text content.
resultSize The maximum number of exclusions that can be returned by the exclusion service when searching for exclusions.
isNewExclusionsOnlyNotification A boolean flag to indicate if the notification is only applicable for new exclusions or if it notifies for all outstanding exclusions for a business stream.

It is possible to configure any number of notifications and the email content supports the rendering of any UTF-8 character set.

Example notification configuration block

dashboard.notification[0].jobName=notification-1
dashboard.notification[0].emailBodyTemplate=<path-to-template>/notification-email-jp.html
dashboard.notification[0].emailSubject=<path-to-template>/notification-email-subject-jp.html
dashboard.notification[0].businessStreamName=Bond Business Stream 
dashboard.notification[0].recipientList=ikasan@there.com, ikasan2@there.com
dashboard.notification[0].cronExpression=0/5 * * * * ?
dashboard.notification[0].isHtml=true
dashboard.notification[0].resultSize=100
dashboard.notification[0].isNewExclusionsOnlyNotification=true

Configuring scheduler notifications

Name Description
jobName Each individual notification must provide a job name to be registered with the scheduler.
emailBodyTemplate A Thymeleaf template used to render the email notification content. This can be either a text or html format.
emailSubjectTemplate A Thymeleaf template used to render the email notification subject. This can be a text format ONLY.
schedulerAgentName The name of the scheduler agent for which we are raising the notification for.
recipientList A list of email addresses to whom the emails will be sent.
cronExpression The quartz cron expression used by the scheduler to fire the notification events.
isHtml A boolean flag to indicate if the email body contains html content or text content.
resultSize The maximum number of failed jobs to search for.

It is possible to configure any number of notifications and the email content supports the rendering of any UTF-8 character set.

Example scheduler notification configuration block

scheduler.notification[0].jobName=notification-1
scheduler.notification[0].emailBodyTemplate=<path-to-template>/notification-email-jp.html
scheduler.notification[0].emailSubject=<path-to-template>/notification-email-subject-jp.html
scheduler.notification[0].schedulerAgentName=Scheduler-Agent
scheduler.notification[0].recipientList=ikasan@there.com, ikasan2@there.com
scheduler.notification[0].cronExpression=0/5 * * * * ?
scheduler.notification[0].isHtml=true
scheduler.notification[0].resultSize=100

Example html notification template

<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <style>
            div.container {
                display: inline-block;
            }
        </style>
    </head>
    <body>
        <div class="container">
            <img src="http://localhost:9090/frontend/images/hospital-service.png" height="200px"/>
        </div>
        <div class="container">
            <img src="http://localhost:9090/frontend/images/ikasan-titling-transparent.png" height="150px"/>
        </div>
        <p>
            Business Stream: <span th:utext="${businessStreamModel.businessStreamMetaData.name}"></span>
        </p>
        
        <p>The following exclusions have been recorded:</p>
        <ul th:remove="all-but-first">
            <li th:each="businessStreamExclusion : ${businessStreamModel.businessStreamExclusions}"
                th:text="${businessStreamExclusion.errorOccurrence.uri}">Reading
            </li>
        </ul>
        <p>
            Please log into the Ikasan dashboard to remediate these events.
        </p>
        <p>
            Regards, <br/>
            <em>The Ikasan Team</em>
        </p>
    </body>
</html>

Example text notification template

Business Stream: [( ${businessStreamModel.businessStreamMetaData.name} )]


The following exclusions have been recorded:
[# th:each="businessStreamExclusion : ${businessStreamModel.businessStreamExclusions}"]
 - [( ${businessStreamExclusion.errorOccurrence.uri} )]
[/]

Please log into the Ikasan dashboard to remediate these events.

Regards,
    The Ikasan Team

Example email subject template

Attention. Events have been excluded for the following business stream: [( ${businessStreamModel.businessStreamMetaData.name} )]

See Thymeleaf documentation for more details on how to create to create notification templates.