LOG.debug("Execution finished for {}, {}", task, execution);
// Propagation is interrupted as soon as the result of the
// communication with a primary resource is in error
PropagationTaskExecStatus execStatus;
try {
execStatus = PropagationTaskExecStatus.valueOf(execution.getStatus());
} catch (IllegalArgumentException e) {
LOG.error("Unexpected execution status found {}", execution.getStatus());
execStatus = PropagationTaskExecStatus.FAILURE;
}
if (task.getResource().isPropagationPrimary() && !execStatus.isSuccessful()) {
throw new PropagationException(task.getResource().getName(), execution.getMessage());
}
}
}