Task Failure Listeners
Task Choice |
Task Failed E-mail Template |
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.
Use the Trigger limit attribute, to set up the maximum number of times the Task Failure Listener triggers a reaction to failure.
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 email if the change is detected. If the File Listener fails to send the email 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, the difference is that when creating a new Task Failure Listener the pre-selected task is Sending an email if the email service is configured in Configuration.
Figure 38.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 can still 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 email, you can use the 'task failed' template by selecting it from the E-mail template dropdown menu.
Task Failed E-mail Template
The default email template may be modified using placeholders described in Placeholders and parameters in Table 38.10, “Parameters usable in task failure email template”. Furthermore, some additional parameters can be used if the failed listener is a File Event Listener, see Table 38.11, “File Event Listener specific parameters usable in task failure email template”.
Table 38.10. Parameters usable in task failure email template
Parameter | Description |
---|---|
TASK_LISTENER_ID | The ID of the failed listener. |
TASK_LISTENER_NAME | The name of the failed listener. |
TASK_LISTENER_TYPE | The type of the failed listener. |
TASK_LISTENER_TYPE_TEXT | The full name of the failed listener's type. |
TASK_LISTENER_OWNER_USERNAME | The owner of the failed listener. |
Table 38.11. File Event Listener specific parameters usable in task failure email template
Parameter | Description |
---|---|
FILE_EVENT_LISTENER_FILE_PATH | The path to the observed directory. |
FILE_EVENT_LISTENER_FILE_REMOTE_URL | The full remote URL of the observed directory. |
FILE_EVENT_LISTENER_FILE_NAME_PATTERN | The filename pattern of the files the listener observes. |
FILE_EVENT_LISTENER_FILE_CHECK_TYPE | The type of check the listener performs. |
FILE_EVENT_LISTENER_FILE_MATCH_TYPE | The listener's filename match type. |
FILE_EVENT_LISTENER_FILE_NODE | The Node IDs of nodes the listener can be initialized by. |