Version

    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.

    Web GUI - creating a Task Failure listener

    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

    ParameterDescription
    TASK_LISTENER_IDThe ID of the failed listener.
    TASK_LISTENER_NAMEThe name of the failed listener.
    TASK_LISTENER_TYPEThe type of the failed listener.
    TASK_LISTENER_TYPE_TEXTThe full name of the failed listener's type.
    TASK_LISTENER_OWNER_USERNAMEThe owner of the failed listener.

    Table 38.11. File Event Listener specific parameters usable in task failure email template

    ParameterDescription
    FILE_EVENT_LISTENER_FILE_PATHThe path to the observed directory.
    FILE_EVENT_LISTENER_FILE_REMOTE_URLThe full remote URL of the observed directory.
    FILE_EVENT_LISTENER_FILE_NAME_PATTERNThe filename 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_NODEThe Node IDs of nodes the listener can be initialized by.