use of eu.bcvsolutions.idm.core.scheduler.task.impl.ProcessAutomaticRoleByAttributeTaskExecutor in project CzechIdMng by bcvsolutions.
the class DefaultIdmAutomaticRoleAttributeService method recalculate.
@Override
@Transactional
public IdmAutomaticRoleAttributeDto recalculate(UUID automaticRoleId) {
Assert.notNull(automaticRoleId);
//
// set concept to false before recalculation
IdmAutomaticRoleAttributeDto automaticRolAttributeDto = this.get(automaticRoleId);
automaticRolAttributeDto.setConcept(false);
automaticRolAttributeDto = this.save(automaticRolAttributeDto);
//
ProcessAutomaticRoleByAttributeTaskExecutor automaticRoleTask = AutowireHelper.createBean(ProcessAutomaticRoleByAttributeTaskExecutor.class);
automaticRoleTask.setAutomaticRoleId(automaticRoleId);
longRunningTaskManager.execute(automaticRoleTask);
//
return automaticRolAttributeDto;
}
use of eu.bcvsolutions.idm.core.scheduler.task.impl.ProcessAutomaticRoleByAttributeTaskExecutor in project CzechIdMng by bcvsolutions.
the class DefaultIdmAutomaticRoleRequestServiceIntegrationTest method recalculateSync.
/**
* Method correspond method
* {@link IdmAutomaticRoleAttributeRuleService#recalculate()} but in
* synchronized mode
*/
private Boolean recalculateSync(UUID automaticRoleId) {
ProcessAutomaticRoleByAttributeTaskExecutor automaticRoleTask = AutowireHelper.createBean(ProcessAutomaticRoleByAttributeTaskExecutor.class);
automaticRoleTask.setAutomaticRoleId(automaticRoleId);
return longRunningTaskManager.executeSync(automaticRoleTask);
}
Aggregations