Search in sources :

Example 16 with IdmLongRunningTaskFilter

use of eu.bcvsolutions.idm.core.scheduler.api.dto.filter.IdmLongRunningTaskFilter in project CzechIdMng by bcvsolutions.

the class DefaultLongRunningTaskManager method init.

/**
 * Cancel all previously ran tasks
 */
@Override
@Transactional
public void init() {
    LOG.info("Cancel unprocessed long running task - tasks was interrupt during instance restart");
    // 
    // task prepared for run - they can be in running state, but process physically doesn't started yet (running flag is still set to false)
    String instanceId = configurationService.getInstanceId();
    service.findAllByInstance(instanceId, OperationState.RUNNING).forEach(this::cancelTaskByRestart);
    // 
    // running tasks - they can be marked as canceled, but they were not killed before server was restarted
    IdmLongRunningTaskFilter filter = new IdmLongRunningTaskFilter();
    filter.setInstanceId(instanceId);
    filter.setRunning(Boolean.TRUE);
    service.find(filter, null).forEach(this::cancelTaskByRestart);
}
Also used : IdmLongRunningTaskFilter(eu.bcvsolutions.idm.core.scheduler.api.dto.filter.IdmLongRunningTaskFilter) Transactional(org.springframework.transaction.annotation.Transactional)

Example 17 with IdmLongRunningTaskFilter

use of eu.bcvsolutions.idm.core.scheduler.api.dto.filter.IdmLongRunningTaskFilter in project CzechIdMng by bcvsolutions.

the class DefaultLongRunningTaskManager method switchInstanceId.

@Override
@Transactional
public int switchInstanceId(String previousInstanceId, String newInstanceId) {
    Assert.hasLength(previousInstanceId, "Previous asynchronous instance is required.");
    boolean stopProcessing = configurationService.getBooleanValue(SchedulerConfiguration.PROPERTY_TASK_ASYNCHRONOUS_STOP_PROCESSING, false);
    // 
    try {
        String asynchronousInstanceId = configurationService.getInstanceId();
        // resolve default
        if (StringUtils.isEmpty(newInstanceId)) {
            newInstanceId = asynchronousInstanceId;
        }
        if (previousInstanceId.equals(newInstanceId)) {
            LOG.info("Previous instance is same as newly used for asynchronous task processing [{}].", newInstanceId);
            // return currently used
            return 0;
        }
        // stop asynchronous task processing
        configurationService.setBooleanValue(SchedulerConfiguration.PROPERTY_TASK_ASYNCHRONOUS_STOP_PROCESSING, true);
        // find all created tasks with old instance and move them to new instance
        IdmLongRunningTaskFilter filter = new IdmLongRunningTaskFilter();
        filter.setInstanceId(previousInstanceId);
        filter.setOperationState(OperationState.CREATED);
        List<IdmLongRunningTaskDto> tasks = findLongRunningTasks(filter, null).getContent();
        for (IdmLongRunningTaskDto task : tasks) {
            task.setInstanceId(newInstanceId);
            Map<String, Object> taskProperties = task.getTaskProperties();
            if (taskProperties.containsKey(LongRunningTaskExecutor.PARAMETER_INSTANCE_ID)) {
                taskProperties.put(LongRunningTaskExecutor.PARAMETER_INSTANCE_ID, newInstanceId);
            }
            saveLongRunningTask(task);
        }
        // 
        return tasks.size();
    } finally {
        // start asynchronous task processing
        configurationService.setBooleanValue(SchedulerConfiguration.PROPERTY_TASK_ASYNCHRONOUS_STOP_PROCESSING, stopProcessing);
    }
}
Also used : IdmLongRunningTaskDto(eu.bcvsolutions.idm.core.scheduler.api.dto.IdmLongRunningTaskDto) IdmLongRunningTaskFilter(eu.bcvsolutions.idm.core.scheduler.api.dto.filter.IdmLongRunningTaskFilter) Transactional(org.springframework.transaction.annotation.Transactional)

Example 18 with IdmLongRunningTaskFilter

use of eu.bcvsolutions.idm.core.scheduler.api.dto.filter.IdmLongRunningTaskFilter in project CzechIdMng by bcvsolutions.

the class DefaultIdmAutomaticRoleAttributeServiceIntegrationTest method testRemoveLastRuleRecount.

@Test
public void testRemoveLastRuleRecount() {
    // start transaction
    TransactionContextHolder.setContext(TransactionContextHolder.createEmptyContext());
    UUID transactionId = TransactionContextHolder.getContext().getTransactionId();
    // 
    IdmIdentityDto identity = getHelper().createIdentity((GuardedString) null);
    IdmRoleDto role = getHelper().createRole();
    // 
    IdmAutomaticRoleAttributeDto automaticRole = getHelper().createAutomaticRole(role.getId());
    // 
    IdmAutomaticRoleAttributeRuleDto automaticRoleRule = getHelper().createAutomaticRoleRule(automaticRole.getId(), AutomaticRoleAttributeRuleComparison.EQUALS, AutomaticRoleAttributeRuleType.IDENTITY, IdmIdentity_.username.getName(), null, identity.getUsername());
    this.recalculateSync(automaticRole.getId());
    // 
    List<IdmIdentityRoleDto> identityRoles = identityRoleService.findAllByIdentity(identity.getId());
    Assert.assertEquals(1, identityRoles.size());
    Assert.assertEquals(transactionId, identityRoles.get(0).getTransactionId());
    // 
    automaticRoleAttributeRuleService.delete(automaticRoleRule);
    identityRoles = identityRoleService.findAllByIdentity(identity.getId());
    Assert.assertTrue(identityRoles.isEmpty());
    // 
    this.recalculateSync(automaticRole.getId());
    identityRoles = identityRoleService.findAllByIdentity(identity.getId());
    Assert.assertTrue(identityRoles.isEmpty());
    // 
    // check all LRT ended successfully
    IdmLongRunningTaskFilter filter = new IdmLongRunningTaskFilter();
    filter.setTransactionId(transactionId);
    List<IdmLongRunningTaskDto> lrts = longRunningTaskManager.findLongRunningTasks(filter, null).getContent();
    Assert.assertFalse(lrts.isEmpty());
    Assert.assertTrue(lrts.stream().allMatch(lrt -> lrt.getResultState() == OperationState.EXECUTED));
}
Also used : DtoUtils(eu.bcvsolutions.idm.core.api.utils.DtoUtils) IdmIdentityRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityRoleDto) ZonedDateTime(java.time.ZonedDateTime) IdmFormAttributeDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormAttributeDto) IdmIdentityContract(eu.bcvsolutions.idm.core.model.entity.IdmIdentityContract) IdmTreeNodeDto(eu.bcvsolutions.idm.core.api.dto.IdmTreeNodeDto) Autowired(org.springframework.beans.factory.annotation.Autowired) BaseCodeList(eu.bcvsolutions.idm.core.eav.api.domain.BaseCodeList) IdmAutomaticRoleAttributeRuleFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmAutomaticRoleAttributeRuleFilter) FormService(eu.bcvsolutions.idm.core.eav.api.service.FormService) ProcessAllAutomaticRoleByAttributeTaskExecutor(eu.bcvsolutions.idm.core.scheduler.task.impl.ProcessAllAutomaticRoleByAttributeTaskExecutor) AutowireHelper(eu.bcvsolutions.idm.core.api.utils.AutowireHelper) IdmAutomaticRoleAttributeDto(eu.bcvsolutions.idm.core.api.dto.IdmAutomaticRoleAttributeDto) IdmFormValueDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormValueDto) IdmAutomaticRoleAttributeRuleDto(eu.bcvsolutions.idm.core.api.dto.IdmAutomaticRoleAttributeRuleDto) ResultCodeException(eu.bcvsolutions.idm.core.api.exception.ResultCodeException) After(org.junit.After) TransactionContextHolder(eu.bcvsolutions.idm.core.api.domain.TransactionContextHolder) IdmLongRunningTaskFilter(eu.bcvsolutions.idm.core.scheduler.api.dto.filter.IdmLongRunningTaskFilter) Assert.fail(org.junit.Assert.fail) Sort(org.springframework.data.domain.Sort) AutomaticRoleAttributeRuleType(eu.bcvsolutions.idm.core.api.domain.AutomaticRoleAttributeRuleType) IdmIdentity(eu.bcvsolutions.idm.core.model.entity.IdmIdentity) IdmIdentityContractService(eu.bcvsolutions.idm.core.api.service.IdmIdentityContractService) ContractState(eu.bcvsolutions.idm.core.api.domain.ContractState) PageRequest(org.springframework.data.domain.PageRequest) IdmFormProjectionDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormProjectionDto) UUID(java.util.UUID) Instant(java.time.Instant) IdentityState(eu.bcvsolutions.idm.core.api.domain.IdentityState) ZoneId(java.time.ZoneId) Serializable(java.io.Serializable) List(java.util.List) EventConfiguration(eu.bcvsolutions.idm.core.api.config.domain.EventConfiguration) IdmEmailLogRepository(eu.bcvsolutions.idm.core.notification.repository.IdmEmailLogRepository) Assert.assertFalse(org.junit.Assert.assertFalse) ProcessAutomaticRoleByAttributeTaskExecutor(eu.bcvsolutions.idm.core.scheduler.task.impl.ProcessAutomaticRoleByAttributeTaskExecutor) LocalDate(java.time.LocalDate) Identifiable(eu.bcvsolutions.idm.core.api.domain.Identifiable) IdmAutomaticRoleAttributeRuleService(eu.bcvsolutions.idm.core.api.service.IdmAutomaticRoleAttributeRuleService) IdmIdentityService(eu.bcvsolutions.idm.core.api.service.IdmIdentityService) GuardedString(eu.bcvsolutions.idm.core.security.api.domain.GuardedString) IdmAutomaticRoleAttributeService(eu.bcvsolutions.idm.core.api.service.IdmAutomaticRoleAttributeService) AbstractIdmAutomaticRoleDto(eu.bcvsolutions.idm.core.api.dto.AbstractIdmAutomaticRoleDto) IdmIdentityRole_(eu.bcvsolutions.idm.core.model.entity.IdmIdentityRole_) IdmNotificationLogRepository(eu.bcvsolutions.idm.core.notification.repository.IdmNotificationLogRepository) ArrayList(java.util.ArrayList) IdmTreeTypeDto(eu.bcvsolutions.idm.core.api.dto.IdmTreeTypeDto) PersistentType(eu.bcvsolutions.idm.core.eav.api.domain.PersistentType) Lists(com.google.common.collect.Lists) IdmFormProjectionService(eu.bcvsolutions.idm.core.eav.api.service.IdmFormProjectionService) AbstractIntegrationTest(eu.bcvsolutions.idm.test.api.AbstractIntegrationTest) BaseFaceType(eu.bcvsolutions.idm.core.eav.api.domain.BaseFaceType) Direction(org.springframework.data.domain.Sort.Direction) IdmIdentityContractDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityContractDto) Before(org.junit.Before) IdmIdentityRoleService(eu.bcvsolutions.idm.core.api.service.IdmIdentityRoleService) IdmIdentityRoleFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmIdentityRoleFilter) LongRunningTaskManager(eu.bcvsolutions.idm.core.scheduler.api.service.LongRunningTaskManager) Assert.assertNotNull(org.junit.Assert.assertNotNull) IdmIdentityDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto) Assert.assertTrue(org.junit.Assert.assertTrue) OperationState(eu.bcvsolutions.idm.core.api.domain.OperationState) Test(org.junit.Test) IdmIdentityContract_(eu.bcvsolutions.idm.core.model.entity.IdmIdentityContract_) Assert.assertNotEquals(org.junit.Assert.assertNotEquals) IdmAutomaticRoleFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmAutomaticRoleFilter) IdmFormDefinitionDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormDefinitionDto) Assert.assertNull(org.junit.Assert.assertNull) IdmRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleDto) IdmLongRunningTaskDto(eu.bcvsolutions.idm.core.scheduler.api.dto.IdmLongRunningTaskDto) Ignore(org.junit.Ignore) AutomaticRoleAttributeRuleComparison(eu.bcvsolutions.idm.core.api.domain.AutomaticRoleAttributeRuleComparison) IdmIdentity_(eu.bcvsolutions.idm.core.model.entity.IdmIdentity_) Assert(org.junit.Assert) Assert.assertEquals(org.junit.Assert.assertEquals) IdmRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleDto) IdmLongRunningTaskDto(eu.bcvsolutions.idm.core.scheduler.api.dto.IdmLongRunningTaskDto) IdmLongRunningTaskFilter(eu.bcvsolutions.idm.core.scheduler.api.dto.filter.IdmLongRunningTaskFilter) IdmAutomaticRoleAttributeRuleDto(eu.bcvsolutions.idm.core.api.dto.IdmAutomaticRoleAttributeRuleDto) UUID(java.util.UUID) IdmIdentityDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto) IdmIdentityRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityRoleDto) IdmAutomaticRoleAttributeDto(eu.bcvsolutions.idm.core.api.dto.IdmAutomaticRoleAttributeDto) AbstractIntegrationTest(eu.bcvsolutions.idm.test.api.AbstractIntegrationTest) Test(org.junit.Test)

Example 19 with IdmLongRunningTaskFilter

use of eu.bcvsolutions.idm.core.scheduler.api.dto.filter.IdmLongRunningTaskFilter in project CzechIdMng by bcvsolutions.

the class DeleteLongRunningTaskExecutorIntegrationTest method testDeleteOldLongRunningTasks.

@Test
public void testDeleteOldLongRunningTasks() {
    // prepare provisioning operations
    ZonedDateTime createdOne = ZonedDateTime.now().minusDays(2);
    UUID ownerId = UUID.randomUUID();
    IdmLongRunningTaskDto operationOne = createDto(ownerId, createdOne, OperationState.EXECUTED);
    // all other variants for not removal
    createDto(ownerId, LocalDate.now().atStartOfDay(ZoneId.systemDefault()).plusMinutes(1), OperationState.EXECUTED);
    createDto(ownerId, LocalDate.now().atStartOfDay(ZoneId.systemDefault()).plusMinutes(1), OperationState.CREATED);
    createDto(ownerId, LocalDate.now().atStartOfDay(ZoneId.systemDefault()).plusMinutes(1), OperationState.EXECUTED);
    createDto(ownerId, ZonedDateTime.now().minusDays(2), OperationState.EXCEPTION);
    createDto(ownerId, LocalDate.now().atStartOfDay(ZoneId.systemDefault()).minusHours(22), OperationState.EXECUTED);
    // 
    Assert.assertEquals(createdOne, operationOne.getCreated());
    IdmLongRunningTaskFilter filter = new IdmLongRunningTaskFilter();
    filter.setInstanceId(ownerId.toString());
    List<IdmLongRunningTaskDto> lrts = service.find(filter, null).getContent();
    Assert.assertEquals(6, lrts.size());
    // 
    DeleteLongRunningTaskExecutor taskExecutor = new DeleteLongRunningTaskExecutor();
    Map<String, Object> properties = new HashMap<>();
    properties.put(DeleteLongRunningTaskExecutor.PARAMETER_NUMBER_OF_DAYS, 1);
    properties.put(DeleteLongRunningTaskExecutor.PARAMETER_OPERATION_STATE, OperationState.EXECUTED);
    AutowireHelper.autowire(taskExecutor);
    taskExecutor.init(properties);
    // 
    longRunningTaskManager.execute(taskExecutor);
    // 
    lrts = service.find(filter, null).getContent();
    Assert.assertEquals(5, lrts.size());
    Assert.assertTrue(lrts.stream().allMatch(a -> !a.getId().equals(operationOne.getId())));
}
Also used : LongRunningTaskManager(eu.bcvsolutions.idm.core.scheduler.api.service.LongRunningTaskManager) ZonedDateTime(java.time.ZonedDateTime) Autowired(org.springframework.beans.factory.annotation.Autowired) OperationState(eu.bcvsolutions.idm.core.api.domain.OperationState) HashMap(java.util.HashMap) Test(org.junit.Test) UUID(java.util.UUID) ZoneId(java.time.ZoneId) AutowireHelper(eu.bcvsolutions.idm.core.api.utils.AutowireHelper) List(java.util.List) IdmLongRunningTaskDto(eu.bcvsolutions.idm.core.scheduler.api.dto.IdmLongRunningTaskDto) OperationResult(eu.bcvsolutions.idm.core.api.entity.OperationResult) LocalDate(java.time.LocalDate) Map(java.util.Map) AbstractIntegrationTest(eu.bcvsolutions.idm.test.api.AbstractIntegrationTest) IdmLongRunningTaskFilter(eu.bcvsolutions.idm.core.scheduler.api.dto.filter.IdmLongRunningTaskFilter) IdmLongRunningTaskService(eu.bcvsolutions.idm.core.scheduler.api.service.IdmLongRunningTaskService) Assert(org.junit.Assert) IdmLongRunningTaskDto(eu.bcvsolutions.idm.core.scheduler.api.dto.IdmLongRunningTaskDto) ZonedDateTime(java.time.ZonedDateTime) HashMap(java.util.HashMap) IdmLongRunningTaskFilter(eu.bcvsolutions.idm.core.scheduler.api.dto.filter.IdmLongRunningTaskFilter) UUID(java.util.UUID) Test(org.junit.Test) AbstractIntegrationTest(eu.bcvsolutions.idm.test.api.AbstractIntegrationTest)

Example 20 with IdmLongRunningTaskFilter

use of eu.bcvsolutions.idm.core.scheduler.api.dto.filter.IdmLongRunningTaskFilter in project CzechIdMng by bcvsolutions.

the class AbstractLongRunningTaskExecutor method validate.

/**
 * Validates task before start e.q. if task already running or to prevent run task concurrently.
 *
 * Look out: override this method additively
 *
 * @param task persisted task to validate
 */
@Override
public void validate(IdmLongRunningTaskDto task) {
    Assert.notNull(task, "Long running task has to be prepared before task is started");
    // 
    if (task.isRunning()) {
        throw new ResultCodeException(CoreResultCode.LONG_RUNNING_TASK_IS_RUNNING, ImmutableMap.of("taskId", task.getId()));
    }
    if (!OperationState.isRunnable(task.getResultState())) {
        throw new ResultCodeException(CoreResultCode.LONG_RUNNING_TASK_IS_PROCESSED, ImmutableMap.of("taskId", task.getId()));
    }
    // 
    // check concurrent task is not running (or waiting => operation state is used)
    String taskType = task.getTaskType();
    if (this.getClass().isAnnotationPresent(DisallowConcurrentExecution.class)) {
        IdmLongRunningTaskFilter filter = new IdmLongRunningTaskFilter();
        filter.setTaskType(taskType);
        filter.setOperationState(OperationState.RUNNING);
        // ignore waiting tasks
        filter.setRunning(Boolean.TRUE);
        List<UUID> runningTasks = longRunningTaskService.findIds(filter, null).getContent().stream().filter(t -> {
            // not self
            return !t.equals(task.getId());
        }).collect(Collectors.toList());
        if (!runningTasks.isEmpty()) {
            throw new ConcurrentExecutionException(CoreResultCode.LONG_RUNNING_TASK_IS_RUNNING, ImmutableMap.of("taskId", getName()));
        }
    }
    if (this.getClass().isAnnotationPresent(IdmCheckConcurrentExecution.class)) {
        List<String> disallowConcurrentTaskTypes = new ArrayList<>();
        IdmCheckConcurrentExecution disallowConcurrentExecution = this.getClass().getAnnotation(IdmCheckConcurrentExecution.class);
        Class<? extends LongRunningTaskExecutor<?>>[] taskTypes = disallowConcurrentExecution.taskTypes();
        if (taskTypes.length == 0) {
            disallowConcurrentTaskTypes.add(taskType);
        } else {
            disallowConcurrentTaskTypes.addAll(// TODO: move to utils somewhere - DRY manager
            Arrays.asList(taskTypes).stream().map(Class::getCanonicalName).collect(Collectors.toList()));
        }
        // TODO: filter.setTaskTypes(...)
        disallowConcurrentTaskTypes.forEach(concurrentTaskType -> {
            IdmLongRunningTaskFilter filter = new IdmLongRunningTaskFilter();
            filter.setTaskType(concurrentTaskType);
            filter.setOperationState(OperationState.RUNNING);
            // ignore waiting tasks
            filter.setRunning(Boolean.TRUE);
            List<UUID> runningTasks = longRunningTaskService.findIds(filter, null).getContent().stream().filter(t -> {
                // not self
                return !t.equals(task.getId());
            }).collect(Collectors.toList());
            if (!runningTasks.isEmpty()) {
                throw new AcceptedException(CoreResultCode.LONG_RUNNING_TASK_ACCEPTED, ImmutableMap.of("taskId", getName()));
            }
        });
    }
}
Also used : Arrays(java.util.Arrays) IdmProcessedTaskItemDto(eu.bcvsolutions.idm.core.scheduler.api.dto.IdmProcessedTaskItemDto) IdmEntityEventDto(eu.bcvsolutions.idm.core.api.dto.IdmEntityEventDto) ZonedDateTime(java.time.ZonedDateTime) Autowired(org.springframework.beans.factory.annotation.Autowired) HashMap(java.util.HashMap) TransactionContext(eu.bcvsolutions.idm.core.api.domain.TransactionContext) ConfigurationService(eu.bcvsolutions.idm.core.api.service.ConfigurationService) ArrayList(java.util.ArrayList) AutowireHelper(eu.bcvsolutions.idm.core.api.utils.AutowireHelper) AbstractDto(eu.bcvsolutions.idm.core.api.dto.AbstractDto) LookupService(eu.bcvsolutions.idm.core.api.service.LookupService) Propagation(org.springframework.transaction.annotation.Propagation) OperationResultDto(eu.bcvsolutions.idm.core.api.dto.OperationResultDto) OperationResult(eu.bcvsolutions.idm.core.api.entity.OperationResult) ResultCodeException(eu.bcvsolutions.idm.core.api.exception.ResultCodeException) EntityUtils(eu.bcvsolutions.idm.core.api.utils.EntityUtils) Map(java.util.Map) DisallowConcurrentExecution(org.quartz.DisallowConcurrentExecution) TransactionContextHolder(eu.bcvsolutions.idm.core.api.domain.TransactionContextHolder) IdmLongRunningTaskFilter(eu.bcvsolutions.idm.core.scheduler.api.dto.filter.IdmLongRunningTaskFilter) LongRunningTaskEventType(eu.bcvsolutions.idm.core.scheduler.api.event.LongRunningTaskEvent.LongRunningTaskEventType) ConcurrentExecutionException(eu.bcvsolutions.idm.core.scheduler.api.exception.ConcurrentExecutionException) BeanNameAware(org.springframework.beans.factory.BeanNameAware) IdmCheckConcurrentExecution(eu.bcvsolutions.idm.core.scheduler.api.domain.IdmCheckConcurrentExecution) EntityEventLock(eu.bcvsolutions.idm.core.api.event.EntityEventLock) ImmutableMap(com.google.common.collect.ImmutableMap) OperationState(eu.bcvsolutions.idm.core.api.domain.OperationState) AcceptedException(eu.bcvsolutions.idm.core.api.exception.AcceptedException) EnabledEvaluator(eu.bcvsolutions.idm.core.security.api.service.EnabledEvaluator) UUID(java.util.UUID) Collectors(java.util.stream.Collectors) ParameterConverter(eu.bcvsolutions.idm.core.api.utils.ParameterConverter) List(java.util.List) IdmLongRunningTaskDto(eu.bcvsolutions.idm.core.scheduler.api.dto.IdmLongRunningTaskDto) CoreResultCode(eu.bcvsolutions.idm.core.api.domain.CoreResultCode) Optional(java.util.Optional) LongRunningTaskEvent(eu.bcvsolutions.idm.core.scheduler.api.event.LongRunningTaskEvent) DefaultResultModel(eu.bcvsolutions.idm.core.api.dto.DefaultResultModel) ResultModel(eu.bcvsolutions.idm.core.api.dto.ResultModel) EntityEventManager(eu.bcvsolutions.idm.core.api.service.EntityEventManager) Transactional(org.springframework.transaction.annotation.Transactional) Assert(org.springframework.util.Assert) ResultCodeException(eu.bcvsolutions.idm.core.api.exception.ResultCodeException) ArrayList(java.util.ArrayList) ConcurrentExecutionException(eu.bcvsolutions.idm.core.scheduler.api.exception.ConcurrentExecutionException) IdmCheckConcurrentExecution(eu.bcvsolutions.idm.core.scheduler.api.domain.IdmCheckConcurrentExecution) AcceptedException(eu.bcvsolutions.idm.core.api.exception.AcceptedException) IdmLongRunningTaskFilter(eu.bcvsolutions.idm.core.scheduler.api.dto.filter.IdmLongRunningTaskFilter) UUID(java.util.UUID)

Aggregations

IdmLongRunningTaskFilter (eu.bcvsolutions.idm.core.scheduler.api.dto.filter.IdmLongRunningTaskFilter)54 IdmLongRunningTaskDto (eu.bcvsolutions.idm.core.scheduler.api.dto.IdmLongRunningTaskDto)41 Test (org.junit.Test)31 AbstractIntegrationTest (eu.bcvsolutions.idm.test.api.AbstractIntegrationTest)21 UUID (java.util.UUID)18 Transactional (org.springframework.transaction.annotation.Transactional)11 AbstractBulkActionTest (eu.bcvsolutions.idm.test.api.AbstractBulkActionTest)9 OperationState (eu.bcvsolutions.idm.core.api.domain.OperationState)8 IdmIdentityDto (eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto)8 AcceptedException (eu.bcvsolutions.idm.core.api.exception.AcceptedException)8 ResultCodeException (eu.bcvsolutions.idm.core.api.exception.ResultCodeException)8 List (java.util.List)8 Autowired (org.springframework.beans.factory.annotation.Autowired)8 LongRunningFutureTask (eu.bcvsolutions.idm.core.scheduler.api.dto.LongRunningFutureTask)7 Assert (org.junit.Assert)7 OperationResultDto (eu.bcvsolutions.idm.core.api.dto.OperationResultDto)6 IdmBulkActionDto (eu.bcvsolutions.idm.core.api.bulk.action.dto.IdmBulkActionDto)5 EventConfiguration (eu.bcvsolutions.idm.core.api.config.domain.EventConfiguration)5 AutomaticRoleAttributeRuleComparison (eu.bcvsolutions.idm.core.api.domain.AutomaticRoleAttributeRuleComparison)5 AutomaticRoleAttributeRuleType (eu.bcvsolutions.idm.core.api.domain.AutomaticRoleAttributeRuleType)5