Email Templates (2.8)
When a task is scheduled, it can be configured to send email that uses a template defined within InterSystems TotalView™ For Asset Management, as described on this page.
Defining an Email Template
To define an email template:
-
Click the Management
icon in the application menu.
-
In the Email section, click Email Templates.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
Replaced with a comma-separated list of possible actions. This variable applies only to Business Scheduler Task Error templates.
Replaced with TotalView.
Replaced with the name of the environment in which the task was running, for example DEV.
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.
Replaced with the short name of the recipe.
Replaced with the name of the server on which the task was running.
Replaced with the internal session ID (generally useful only for your application partner).
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
Replaced with the date and time when the task run finished (either successfully or not), in UTC time.
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:
-
Click the Management
icon in the application menu.
-
In the Email section, click Email Templates.
-
Click the template you want to edit.
-
Modify the details as needed.
-
Click Save Template.
Deleting an Email Template
To delete an email template (other than the default templates, which cannot be deleted):
-
Click the Management
icon in the application menu.
-
In the Email section, click Email Templates.
-
Click the template you want to delete.
-
Click the Delete
button and then click Delete to confirm.