use of eu.bcvsolutions.idm.core.workflow.model.dto.WorkflowHistoricTaskInstanceDto in project CzechIdMng by bcvsolutions.
the class DefaultWorkflowTaskInstanceService method get.
@Override
public WorkflowTaskInstanceDto get(Serializable id, WorkflowFilterDto context, BasePermission... permission) {
if (context == null) {
context = new WorkflowFilterDto();
}
context.setId(UUID.fromString(String.valueOf(id)));
List<WorkflowTaskInstanceDto> tasks = internalSearch(context, null, permission).getContent();
if (!tasks.isEmpty()) {
return tasks.get(0);
}
// Current task doesn't exists, we try to find historic task.
WorkflowHistoricTaskInstanceDto historicTask = historicTaskInstanceService.get(String.valueOf(id), context);
if (historicTask != null) {
return historicTask;
}
return null;
}
Aggregations