Skip to main content
InterSystems Data Fabric Studio
AskMe (beta)

Email Templates (2.9)

When a task is scheduled, it can be configured to send email that uses a template defined within InterSystems® Data Fabric Studio™, as described on this page.

Defining an Email Template

To define an email template:

  1. Click the Management icon in the application menu.

  2. In the Email section, click Email Templates.

  3. Click New Template.

    Now use the middle area of the page to define the template (as described next), and view the preview on the right side of the page.

  4. For Template Type, select either Business Scheduler Task Error or Business Scheduler Task Success, depending on whether this template is meant for use in the case of errors or in the case of success, respectively.

  5. For Template Name, specify a unique name for this template (within the given type—it is possible to have templates with the same name if they have different types). Users will see this template name when scheduling tasks.

  6. For Subject, specify the subject line of the email message. The most useful format consists of a combination of text (included as is) and variables (which get replaced when the message is generated).

    For example, the default task error subject line is as follows:

    ERROR: {{ Subject }}
    

    The variable {{ Subject }} is automatically replaced with appropriate text based on the task.

    Similarly, the default task success subject line is as follows:

    SUCCESS: {{ Subject }}
    

    To edit the value in the Subject field, you can type directly and you can use the buttons listed under Variables to insert variables. To insert a variable, first move the cursor to the position where you want the variable to be, and then press the variable button.

  7. For Body, specify the body of the email message. You can use the same techniques as in the Subject field, except that you have more space here for details.

  8. Click Save Template.

Template Variables

This section provides reference information on the variables you can use within an email template. These are listed under Variables. To insert a variable, first move the cursor to the position where you want the variable to be, and then press the variable button. You can also type these.

{{Actions}}

Replaced with a comma-separated list of possible actions. This variable applies only to Business Scheduler Task Error templates.

{{Application}}

Replaced with TotalView.

{{Environment}}

Replaced with the name of the environment in which the task was running, for example DEV.

{{Message}}

For a successful task run, this variable is replaced with generated text of the following form, depending on the task and the name of the item:

The scheduled task, Recipe 'TUES', has been completed successfully

For an unsuccessful task run, this variable is replaced with a detailed error message, depending on the problem that occurred.

{{ResourceName}}

Replaced with the short name of the recipe.

{{ResourceType}}

Replaced with the name of the server on which the task was running.

{{SessionId}}

Replaced with the internal session ID (generally useful only for your application partner).

{{Subject}}

Replaced with a short summary, meant for use in an email subject line. For a successful task run, this variable is replaced with the following text:

Scheduled task completed

For an unsuccessful task run, this variable is replaced with the following text:

Unexpected error when running scheduled task
{{UTCTime}}

Replaced with the date and time when the task run finished (either successfully or not), in UTC time.

{{WorkflowRole}}

Replaced with name of the workflow role for which the message was generated. This role is specified when the task is scheduled.

Editing an Email Template

To edit an email template:

  1. Click the Management icon in the application menu.

  2. In the Email section, click Email Templates.

  3. Click the template you want to edit.

  4. Modify the details as needed.

  5. Click Save Template.

Deleting an Email Template

To delete an email template (other than the default templates, which cannot be deleted):

  1. Click the Management icon in the application menu.

  2. In the Email section, click Email Templates.

  3. Click the template you want to delete.

  4. Click the Delete button and then click Delete to confirm.

See Also

FeedbackOpens in a new tab