use of eu.bcvsolutions.idm.core.scheduler.api.dto.IdmLongRunningTaskDto in project CzechIdMng by bcvsolutions.
the class SchedulerTestUtils method createIdmLongRunningTask.
public static IdmLongRunningTaskDto createIdmLongRunningTask(IdmScheduledTaskDto taskDto, Class<? extends SchedulableTaskExecutor<Boolean>> clazz, boolean running) {
//
IdmLongRunningTaskDto longRunningTask = new IdmLongRunningTaskDto();
longRunningTask.setTaskType(clazz.getCanonicalName());
longRunningTask.setResult(new OperationResult.Builder(running ? OperationState.RUNNING : OperationState.CREATED).build());
longRunningTask.setInstanceId("test_instance");
longRunningTask.setScheduledTask(taskDto.getId());
longRunningTask.setRunning(running);
//
return longRunningTask;
}
Aggregations