Task manager provides the following notifications:
Event | Recipient(s) | Comment |
---|---|---|
Task handler execution start | task owner | Emitted when a task handler execution is started. |
Task handler execution finish | task owner | Emitted when a task handler execution finishes. |
Some examples
The following snippet of the system configuration object can be used to configure task notifications:
A notification looks like this:
The following information is available:
Field | Meaning | Comment | |
---|---|---|---|
Task | The name of the task. Usually it is self-explaining. | ||
Handler | Handler that starts or finishes its execution. Most tasks have exactly one handler. However, some workflow-related tasks can have more (sometimes up to 4) handlers. Each handler start/stop is sent as a standalone event. | ||
Run result status | Result of the handler execution, driving what will be done with the task. Can have values of PERMANENT_ERROR, TEMPORARY_ERROR, FINISHED, FINISHED_HANDLER, INTERRUPTED, RESTART_REQUESTED. (TODO - more information) | Can be tested with isPermanentError(), isTemporaryError(), isFinished(), isInterrupted(), isRestartRequested() event methods. | |
Status | Status as stored in the task's operation result. Can have values of SUCCESS, HANDLED_ERROR, WARNING, PARTIAL_ERROR, FATAL_ERROR, IN_PROGRESS, NOT_APPLICABLE. | Can be tested with <status> filter, or with isSuccess() - corresponds to SUCESS, HANDLED_ERROR, WARNING, isOnlyFailure() - corresponds to FATAL_ERROR, isFailure() - corresponds to PARTIAL_ERROR or FATAL_ERROR. | |
Message | Message that is part of the operation result, if present. | Retrieved via event.getMessage(). | |
Progress | Progress reported by the task. | Retrieved via event.getProgress(). |
So, if you want to send notifications when a problem occurs, it is most advisable to use expressionFilter of event.isPermanentError(), as in the third example.
TODO more detailed explanation