Skip to end of metadata
Go to start of metadata

Task manager provides the following notifications:

EventRecipient(s)Comment
Task handler execution starttask ownerEmitted when a task handler execution is started.
Task handler execution finishtask ownerEmitted 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:

FieldMeaningComment 
TaskThe name of the task. Usually it is self-explaining.  
HandlerHandler 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 statusResult 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. 
StatusStatus 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. 
MessageMessage that is part of the operation result, if present.Retrieved via event.getMessage(). 
ProgressProgress 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

 

  • No labels