Introduction
JS7 - Notification - Configuration is performed from the Configuration->Notification sub-view of JOC Cockpit and includes to set up the configuration for the JS7 - Monitor Service.
- The MailFragment element is used to specify the content, format and recipients of e-mail notifications. The subject and body of e-mails can be populated from JS7 - Notification - Configuration, Monitor Variables.
- In addition mail server connection settings are used from JS7 - Job Resources.
- Find detailed information from the JS7 - How to set up e-mail notification for failed jobs article.
MailFragment
Attributes
The MailFragment
element supports the following attributes:
Attribute | Usage | Description |
---|---|---|
name | Required | Unique name of the fragment. |
job_resources | Required | A list of JS7 - Job Resources that specify mail server connection settings. |
content_type | Optional | Content type of the e-mail. Possible values:
Default: |
charset | Optional | Charset of the e-mail. Default: |
encoding | Optional | Encoding of the e-mail. Possible values:
Default: |
priority | Optional | Priority of the e-mail. Possible values:
Default: |
Attributes from Job Resources
The following settings must be provided by a Job Resource that is assigned a MailFragment:
Attribute | Usage | Description |
---|---|---|
mail.smtp.host | Required | Host name or IP address of the mail server. |
Optional settings include - but are not limited to - settings specific for your mail server, e.g. for authentication:
Attribute | Usage | Description |
---|---|---|
mail.smtp.port | Optional | The port number for SMTP access to the mail server. |
mail.smtp.timeout | Optional | Socket read timeout for mail server connection. |
mail.smtp.connectiontimeout | Optional | Socket connection timeout for mail server. |
mail.smtp.user | Optional | User name for the account that sends e-mail. |
mail.smtp.password | Optional | Password for the account that sends e-mail. |
mail.smtp.ssl.protocols | Optional | Specifies the TLS protocol version, e.g. TLSv1, TLSv1.1, TLSv1.2, should an SSL connection be used |
Basically, any settings with the prefix mail.smtp.
can be configured with a Job Resource that is assigned the MailFragment. JS7 makes use of JavaMail: a list of available settings for example can be found at https://javaee.github.io/javamail/docs/api/com/sun/mail/smtp/package-summary.html.
Additional optional settings from Job Resources for the E-Mail addresses include, for example:
Attribute | Usage | Description |
---|---|---|
from | Optional | E-mail address of the account that sends e-mail. |
from_name | Optional | Name for the E-mail address of the account that sends e-mail. |
to | Optional | E-mail address of the recipient(s) of a notification e-mail. |
cc | Optional | E-mail address of the recipient(s) of a carbon copy notification e-mail. |
bcc | Optional | E-mail address of recipient(s) of a blind carbon copy notification e-mail. |
Elements
The following elements are nested inside the MailFragment element:
Element | Element description | Description |
---|---|---|
MessageRef | Required, only once inside of the MailFragment element | Body of an e-mail notification that is provided by the referenced Message element. |
Subject | Required, only once inside of the MailFragment element | Subject of an e-mail notification. |
From | Optional or only once inside of the MailFragment element | E-mail address of the account that sends e-mail. |
To | Optional or only once inside of the MailFragment element | E-mail address of the recipient(s) of a notification e-mail. |
CC | Optional or only once inside of the MailFragment element | E-mail address of the recipient(s) of a carbon copy notification e-mail. |
BCC | Optional or only once inside of the MailFragment element | E-mail address of recipient(s) of a blind carbon copy notification e-mail. |
Subject
Subject of an e-mail notification.
The Subject
can include JS7 - Notification - Configuration, Monitor Variables.
Example for generic Subject Element in case of Success and Failure
- The
${MON_N_TYPE}
monitor variable will be substituted by one of the values: SUCCESS, WARNING, ERROR, RECOVERED
JS7 JobScheduler Notification: ${MON_N_TYPE} - Order ID: ${MON_O_ORDER_ID} - Workflow: ${MON_O_WORKFLOW_PATH}
Example for Subject Element in case of Success
JS7 JobScheduler Notification: SUCCESS - Order ID: ${MON_O_ORDER_ID} - Workflow: ${MON_O_WORKFLOW_PATH}
Example for Subject Element in case of Failure
JS7 JobScheduler Notification: FAILURE - Order ID: ${MON_O_ORDER_ID} - Workflow: ${MON_O_WORKFLOW_PATH}
MessageRef
The Message element referenced specifies the body of an e-mail notification.
- The
Message
element can include JS7 - Notification - Configuration, Monitor Variables. - The
Message
element specifies the e-mail body in HTML format or in plain text format.
Example for HTML E-Mail Body in case of Success
- Download: mail_on_success.html
- Users can paste the below example as input to the
Message
element.
Example for HTML E-Mail Body in case of Failure
- Download: mail_on_failure.html
- Users can paste the below example as input to the
Message
element.
Example for TEXT E-Mail Body in case of Success
- Users can paste the below example as input to the
Message
element.
Example for TEXT E-Mail Body in case of Failure
- Users can paste the below example as input to the
Message
element.