}
updated.setPropByRes(origPropByRes);
}
PropagationReporter propagationReporter =
ApplicationContextProvider.getApplicationContext().getBean(PropagationReporter.class);
if (tasks.isEmpty()) {
// SYNCOPE-459: take care of user virtual attributes ...
binder.forceVirtualAttributes(
updated.getResult().getKey(),
actual.getVirtualAttributesToBeRemoved(),
actual.getVirtualAttributesToBeUpdated());
} else {
try {
taskExecutor.execute(tasks, propagationReporter);
} catch (PropagationException e) {
LOG.error("Error propagation primary resource", e);
propagationReporter.onPrimaryResourceFailure(tasks);
}
}
// 4. prepare result, including propagation status on external resources
final UserTO updatedTO = binder.getUserTO(updated.getResult().getKey());
updatedTO.setPropagationStatusTOs(propagationReporter.getStatuses());
return updatedTO;
}