use of eu.bcvsolutions.idm.core.scheduler.task.impl.ProcessAllAutomaticRoleByAttributeTaskExecutor in project CzechIdMng by bcvsolutions.
the class ContractSynchronizationExecutor method executeAutomaticRoleRecalculation.
/**
* Start automatic role by attribute recalculation synchronously.
*
* @param log
* @return
*/
private SysSyncLogDto executeAutomaticRoleRecalculation(SysSyncLogDto log) {
ProcessAllAutomaticRoleByAttributeTaskExecutor executor = new ProcessAllAutomaticRoleByAttributeTaskExecutor();
log.addToLog(MessageFormat.format("After success sync have to be run Automatic role by attribute recalculation. We start him (synchronously) now [{0}].", LocalDateTime.now()));
Boolean executed = longRunningTaskManager.executeSync(executor);
if (BooleanUtils.isTrue(executed)) {
log.addToLog(MessageFormat.format("Recalculation automatic role by attribute ended in [{0}].", LocalDateTime.now()));
} else {
addToItemLog(log, "Warning - recalculation automatic role by attribute is not executed correctly.");
}
return synchronizationLogService.save(log);
}
use of eu.bcvsolutions.idm.core.scheduler.task.impl.ProcessAllAutomaticRoleByAttributeTaskExecutor in project CzechIdMng by bcvsolutions.
the class IdentitySynchronizationExecutor method executeAutomaticRoleRecalculation.
/**
* Start automatic role by attribute recalculation synchronously.
*
* @param log
* @return
*/
private SysSyncLogDto executeAutomaticRoleRecalculation(SysSyncLogDto log) {
ProcessAllAutomaticRoleByAttributeTaskExecutor executor = new ProcessAllAutomaticRoleByAttributeTaskExecutor();
log.addToLog(MessageFormat.format("After success sync have to be run Automatic role by attribute recalculation. We start him (synchronously) now [{0}].", LocalDateTime.now()));
Boolean executed = longRunningTaskManager.executeSync(executor);
if (BooleanUtils.isTrue(executed)) {
log.addToLog(MessageFormat.format("Recalculation automatic role by attribute ended in [{0}].", LocalDateTime.now()));
} else {
addToItemLog(log, "Warning - recalculation automatic role by attribute is not executed correctly.");
}
return synchronizationLogService.save(log);
}
Aggregations