Tutorial - Launching an Email Task Based on a Task Monitor

Introduction

In this exercise, we will set up a Task Monitor and Task Monitor trigger. The Task Monitor will monitor all tasks for a status that indicates some sort of problem. When the trigger is satisfied, Universal Controller will launch an Email task that notifies a user that there is a problem. We will also create an Email template for use in our Email task and create an Activity Monitor filter that displays only problem tasks.

The following illustration shows the various components used to trigger tasks based on the status of other tasks.
 

Select the Activity Monitor Problem Filter

The first task we will do is select the Problem filter for the Activity Monitor. When the user receives an email indicating there is a problem, the user can view this Activity Monitor to find out more information.
 

Step 1

From the Automation Center navigation pane, select Task Instances > Activity. The Activity Monitor displays.

Step 2

Click the Click to start the Activity monitor button. All active task instances display.

Step 3

From the Quick Filter drop-down list, select Status > Problem.
 

 
The Activity Monitor now will display only Problem task instances.

Create an Email Template

Email Templates allow you to create pre-defined Email task information that you refer to when creating an Email task. This is useful if you have a large number of common parameters on Email tasks but still require separate tasks.
 

Step 1

From the Agents & Connections navigation pane, select System > Email Templates. The Email Templates list displays.

Step 2

Click the New button to display an empty Email Template Details and enter the following values:

  • Template Name = Notification based on status
  • Email Connection = (a valid email connection)
  • To = ( a valid email account)
  • Subject = Task Failure Alert
  • Body = Task failure, see Activity Monitor for Problems

Step 3

Click the Save button.
 

Creating an Email Task Using the Email Template

Step 1

From the Automation Center navigation pane, select Tasks > Email Tasks. The Email Tasks list displays.

Step 2

Click the New button to display an empty Email Task Details and enter the following values:

Leave the remaining fields blank, since we want to use the information from the template. (If you fill in any of the duplicate fields, the information from the task overrides the information from the template.)

Step 3

Click the Save button.
 

Creating a Task Monitor Task

For this Task Monitor, we will monitor the status of all other tasks. If any task has a status that indicates there is some sort of problem, we will generate an email. Once the Task Monitor is launched by the Task Monitor trigger, it remains active, launching an Email every time any of its conditions are met. The Task Monitor task remains active until the Task Monitor trigger is disabled or until a user manually stops it.

Step 1

From the Automation Center navigation pane, select Tasks > Task Monitors. The Task Monitors list displays.

Step 2

Click the New button to display an empty Task Monitor Details and enter the following values:

  • Task Name = Monitors for Problems
  • Status To Monitor = enable Running/Problems, Cancel Pending, In Doubt, Start Failure, Confirmation Required, Cancelled, and Failed. (For a description of each status, see Displaying Task Instance Status).
  • Monitoring Type = General Task(s)
  • Task Type To Monitor = enable all task types

Step 3

Click the Save button.
 

Creating a Task Monitor Trigger

As the last step in our set-up process, we will create the Task Monitor trigger, which controls when the Task Monitor task is started and stopped.

Step 1

From the Automation Center navigation pane, select Triggers > Task Monitor Triggers. The Task Monitor Triggers list displays.

Step 2

Click the New button to display an empty Task Monitor Trigger Details and enter the following values:

  • Name = Controls Monitors for Problems
  • Task(s) = Triggered by Task Status
  • Task Monitor = Monitors for Problems

Step 3

Click the Save button.
 

Step 4

On the Task Monitor Triggers list, right-click Controls Monitors for Problems and then click Enable.

Running the Task Monitor

To test our set-up, we need to run a task to one of the failure statuses that will trigger the email. To do so, we will launch the Pause for Manual Manual task created in the Running a Workflow with a Conditional Path tutorial and force it into Failed status.

Step 1

From the Automation Center navigation pane, select Tasks > Manual Tasks. The Manual Tasks list displays.

Step 2

Right-click the Pause for Manual task and, on the Action menu, select Launch Task.

Step 3

Display the Activity Monitor. It will list the Pause for Manual task instance, in Action Required status, and the Monitors for Problems Task Monitor task, which was launched when enabled the Controls Monitor for Problems triggered
 

Step 4

Right-click on Pause for Manual to display an Action menu of actions currently available for this task instance.

Step 5

Click Cancel. Pause for Manual goes to Cancelled status and an Email task is launched by the Task Monitor trigger.
 

Step 8

Check the Email account where you sent the notification.

Step 9

Once the user receives the email, the user can quickly check for more information by looking at the Activity Monitor using the Cancelled Task Instances filter and clicking on the Instance Name of the problem task. As shown in the illustration below, additional information about the issue is displayed in the Status Description field.
 

 


For additional information, see: