monitor.afterExecute(task, worker, ex);
}
// handler the exception
if (ex != null) {
TaskExceptionResult result = exceptionHandler.handleException(ex);
// stop the execution in case of a fatal exception
if (TaskExceptionResult.FATAL.equals(result)) {
state = ExecutionState.STOPPED;
}