Notification Setup

JS7 - Notification is provided to inform, for example, in the event of failed jobs. Notifications can similarly be sent in the event of warnings or the successful execution of jobs.

The steps below describe the set up of e-mail notification.

Set up Job Resource

Set up a Job Resource for mail settings, see the JS7 - Job Environment Variables, section: Job Resource eMailDefault article.

Configure Notification

Notifications are managed from the Configuration->Notification sub-view of the JOC Cockpit. Instructions can be found in the following articles:

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

Configure Message Element

In a first step a Message element is configured within the MessageFragments element which acts as a template for the e-mail body:


  • The screenshot shows the preview of the resulting e-mail body. Use the source view to edit the content of the mail body.
  • Users can create plain text and HTML e-mail templates.
  • The Message element can include JS7 - Notification - Configuration, Monitor Variables.
  • Note that in this example the Message element is assigned the name mail_on_failure which later on is 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 require the use of different e-mail bodies.

Configure MailFragment Element

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


  • The MailFragment element makes use of the name mail_on_failure. This name can be freely chosen.
  • The included MessageRef element allows selection from the list of Message elements. The Message element with the name mail_on_failure is selected in this example.
  • The Subject element can include JS7 - Notification - Configuration, Monitor Variables.
  • The To element 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.


  • Any number of Workflow elements can be added which optionally specify a path to a workflow.
    • A path is a regular expression which 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 matching path.
    • Attributes name, label: The attributes specify the job name and label of the instruction node in a workflow.
    • Attribute criticality: The attribute allows to limit notifications to 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. Note that a job specifies the return codes which are considered successful or not. The range setting can be used in situations where a number of return codes are considered successful, but where an 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.
    • Any number of WorkflowsRef elements can be added.

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

Scope of Notifications

When the notification setup is in place any job errors and warnings are reported by mail. By default a notification is not made for the successful execution of jobs and workflows.

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

Job Notification Settings

By default the notification setup is applied to all jobs in scope of its configuration.

However, jobs can specify a behavior that is different from the notification setup like this:


  • The Notification tab of the job properties editor allows settings to be specified that overwrite the notification setup.
  • Attribute Mail on:  The attribute specifies one or more events for which notifications are sent, in the event of errors, 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 in order to change the recipient of notifications specifically for a job.
    • If the Mail on attribute is used but no Mail To recipient is specified then this will suppress mail notification for the job.


Processing of notifications is logged by the Monitor Service. If mail notifications are not sent then the Monitor Service's log file provides more details:

Further Resources