use of eu.bcvsolutions.idm.core.workflow.model.dto.WorkflowFilterDto in project CzechIdMng by bcvsolutions.
the class WorkflowProcessInstanceController method toFilter.
@Override
protected WorkflowFilterDto toFilter(MultiValueMap<String, Object> parameters) {
WorkflowFilterDto filter = super.toFilter(parameters);
String applicant = getParameterConverter().toString(parameters, "identity");
if (applicant != null) {
IdmIdentityDto identityDto = (IdmIdentityDto) entityLookupService.lookupDto(IdmIdentityDto.class, applicant);
filter.getEqualsVariables().put(WorkflowProcessInstanceService.APPLICANT_IDENTIFIER, identityDto.getId());
}
return filter;
}
use of eu.bcvsolutions.idm.core.workflow.model.dto.WorkflowFilterDto in project CzechIdMng by bcvsolutions.
the class DefaultWorkflowHistoricProcessInstanceService method get.
@Override
public WorkflowHistoricProcessInstanceDto get(String historicProcessInstanceId) {
WorkflowFilterDto filter = new WorkflowFilterDto();
filter.setProcessInstanceId(historicProcessInstanceId);
filter.setSortAsc(true);
Collection<WorkflowHistoricProcessInstanceDto> resources = this.search(filter).getResources();
return !resources.isEmpty() ? resources.iterator().next() : null;
}
use of eu.bcvsolutions.idm.core.workflow.model.dto.WorkflowFilterDto in project CzechIdMng by bcvsolutions.
the class DefaultWorkflowHistoricTaskInstanceService method getTaskByProcessId.
@Override
public WorkflowHistoricTaskInstanceDto getTaskByProcessId(String processId) {
WorkflowFilterDto filter = new WorkflowFilterDto();
filter.setProcessInstanceId(processId);
filter.setSortDesc(true);
List<WorkflowHistoricTaskInstanceDto> resources = (List<WorkflowHistoricTaskInstanceDto>) this.search(filter).getResources();
return !resources.isEmpty() ? resources.get(resources.size() - 1) : null;
}
use of eu.bcvsolutions.idm.core.workflow.model.dto.WorkflowFilterDto in project CzechIdMng by bcvsolutions.
the class DefaultWorkflowProcessInstanceService method get.
@Override
public WorkflowProcessInstanceDto get(String processInstanceId) {
WorkflowFilterDto filter = new WorkflowFilterDto();
filter.setProcessInstanceId(processInstanceId);
filter.setSortAsc(true);
Collection<WorkflowProcessInstanceDto> resources = this.search(filter).getResources();
return !resources.isEmpty() ? resources.iterator().next() : null;
}
use of eu.bcvsolutions.idm.core.workflow.model.dto.WorkflowFilterDto in project CzechIdMng by bcvsolutions.
the class DefaultWorkflowProcessInstanceService method get.
@Override
public WorkflowProcessInstanceDto get(String processInstanceId, boolean checkRight) {
WorkflowFilterDto filter = new WorkflowFilterDto();
filter.setProcessInstanceId(processInstanceId);
filter.setSortAsc(true);
Collection<WorkflowProcessInstanceDto> resources = this.searchInternal(filter, checkRight).getResources();
return !resources.isEmpty() ? resources.iterator().next() : null;
}
Aggregations