You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Notification Setup

JS7 - Notification is offered to notify for example in case of failed jobs. Notifications can similarly be sent in case of warnings or successful execution of jobs.

To set up e-mail notification follow the below steps.

Set up Job Resource

Set up a Job Resource for mail settings, see JS7 - Job Environment Variables, Job Resource eMailDefault

Configure Notification

Notifications are managed from the Configuration->Notification sub-view of JOC Cockpit. Find instructions from the following articles:

The configuration for e-mail notifications could look as explained below.

Configure Message Element

In a first step a Message element is configured with the MessageFragments element that acts as a template for e-mail notifications:


Explanation:

  • The screenshot shows the preview of the resulting e-mail. Use the source view to edit the content of the mail body.
  • Users can create plain text and HTML e-mail templates.
  • Consider that the Message element holds the name mail_on_failure is later on assigned a MessageRef element. This name can be freely chosen.
  • Any number of Message elements can be added, for example for use with different folders and workflows for which different notifications should be sent.

Configure MailFragment Element

In a next step a MailFragment element is configured that specifies the Message element to be used, the recipients and subject of e-mail notification like this:


Explanation:

  • The MailFragment makes use of the name mail_on_failure. This name can be freely chosen.
  • The included MessageRef element allows to select from the list of Message elements. The Message element with the name mail_on_failure is selected.
  • The Subject can include JS7 - Notification - Configuration, Monitor Variables.
  • The To elements holds the recipient's e-mail address. Multiple recipients are separated by a comma.
  • Additional elements can be added such as Cc, Bcc.

Configure Workflows Element

The Workflows element determines the scope of workflows for which notifications are sent.


Explanation:

  • Any number of Workflow elements can be added that optionally specify a path to a workflow.
    • A path is a regular expression that can be used to specify for example the folder of a number of workflows or a common part of the workflow name.
  • Additional WorkflowJob elements can be added that specify attributes to select jobs from the indicated workflows.
    • If the Workflow element does not specify a path then the WorkflowJob attributes are applied to jobs from any workflows, otherwise the configuration is applied to workflows located in the indicated path.
    • Attributes name, label: The attributes specify the job name and label of the instruction node.
    • Attribute criticality: The attribute allows to select jobs that specify the indicated criticality.
    • Attributes return_code_from, return_code_to: The attributes specify a range of return codes (exit codes) for which e-mail notifications are created. Consider that a job specifies the return codes that are considered successful or not. The range setting can be used in a situation when a number of return codes are considered successful, but still some e-mail notification should be sent.

Configure NotificationMonitors Element

Finally the NotificationMonitors element combines previously configured elements:

  • The MailFragmentRef element references the above MailFragment element.
    • Any number of MailFragmentRef elements can be added. 
  • The WorkflowsRef element references the Workflows element.

The NotificationMonitors Element is included with a Notification element than can occur any number of times. This allows some flexibility what Notifications to configure considering specific workflows, jobs and recipients.

Scope of Notifications

With the notification setup being in place any job errors and warnings are reported by mail. By default no notification is performed for successful execution of jobs and workflows.

The notification setup is applied to any workflows and jobs that are in scope of the configuration.

Job Settings for Notification

By default the notification setup is applied to any workflows and jobs that are in scope of its configuration. However, jobs can specify a behavior that is different from the notification setup like this:



Explanation:

  • The Notification tab of the job properties editor offers to specify settings that overwrite the notification setup:
  • Attribute Mail on:  The attribute specifies one or more events for which notifications are sent, in case of error, warnings and success.
  • Attributes Mail To, Mail Cc, Mail Bcc: The attributes specify the recipients of mail notifications. Multiple recipients can be separated by a comma.
  • If job specific notification settings are used then none of the attributes with the same name specified by the notification setup will be used.
    • Therefore both the Mail on attribute and a Mail To recipient have to be specified to change to recipient of notifications specifically for the job.
    • If the Mail on attribute is used but no Mail To recipient is specified then this will suppress mail notification for the job.




  • No labels