Task Failure Listeners

Since 4.4

Task Failure Listeners allow you to detect and react to failures in your server when a task you set up in a listener fails to execute, e.g. a File Listener is set up to detect changes on an FTP server, but it fails to connect to the FTP server.

Task Failure Listeners do not detect failures of the task itself, e.g. a File Listener is set up to detect changes on an FTP server and send an e-mail if the change is detected. If the File Listener fails to send the e-mail for some reason, the Task Failure Listener won't detect it.

The same tasks to be executed are available as with all the other listeners, with the difference being that when creating a new Task Failure Listener the pre-selected task is Sending an e-mail if the e-mail service is configured in Configuration.

Web GUI - creating a Task Failure listener

Figure 24.9. Web GUI - creating a Task Failure listener


Task Choice

There are three options to choose from: Listening to any task failure, listening to failures from a group (such as File Event Listeners), or listening to a failure of a chosen listener.

Selecting an option from the 'Listen to type' menu restricts the 'Listen to' combobox to event sources of the chosen category. If there are no event sources in the category, the Failure Listener still can be created, it will react to failures of tasks that will be created in that category.

When selecting an event source you can type into the text field to filter the dropdown menu. After selecting an event source some information is presented about the listener.

When sending an e-mail you can use the 'task failed' template by selecting it from the 'E-mail template' dropdown menu.

Task Failed E-mail Template

The default e-mail template may be modified using placeholders described in Placeholders and parameters in Table 24.8, “Parameters usable in task failure e-mail template”. Furthermore, some additional parameters can be used if the failed listener is a File Event Listener, see Table 24.9, “File Event Listener specific parameters usable in task failure e-mail template”.

Table 24.8. Parameters usable in task failure e-mail template

ParameterDescription
TASK_LISTENER_IDID of the failed listener.
TASK_LISTENER_NAMEName of the failed listener.
TASK_LISTENER_TYPEType of the failed listener.
TASK_LISTENER_TYPE_TEXTFull name of the failed listener's type.
TASK_LISTENER_OWNER_USERNAMEOwner of the failed listener.

Table 24.9. File Event Listener specific parameters usable in task failure e-mail template

ParameterDescription
FILE_EVENT_LISTENER_FILE_PATHPath to the observed directory.
FILE_EVENT_LISTENER_FILE_REMOTE_URLFull remote URL of the observed directory.
FILE_EVENT_LISTENER_FILE_NAME_PATTERNFilename pattern of the files the listener observes.
FILE_EVENT_LISTENER_FILE_CHECK_TYPEThe type of check the listener performs.
FILE_EVENT_LISTENER_FILE_MATCH_TYPEThe listener's filename match type.
FILE_EVENT_LISTENER_FILE_NODENode IDs of nodes the listener can be intitalized by.