Search in sources :

Example 26 with WorkflowFilterDto

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;
}
Also used : WorkflowFilterDto(eu.bcvsolutions.idm.core.workflow.model.dto.WorkflowFilterDto) IdmIdentityDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto)

Example 27 with WorkflowFilterDto

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;
}
Also used : WorkflowFilterDto(eu.bcvsolutions.idm.core.workflow.model.dto.WorkflowFilterDto) WorkflowHistoricProcessInstanceDto(eu.bcvsolutions.idm.core.workflow.model.dto.WorkflowHistoricProcessInstanceDto)

Example 28 with WorkflowFilterDto

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;
}
Also used : WorkflowFilterDto(eu.bcvsolutions.idm.core.workflow.model.dto.WorkflowFilterDto) ArrayList(java.util.ArrayList) List(java.util.List) WorkflowHistoricTaskInstanceDto(eu.bcvsolutions.idm.core.workflow.model.dto.WorkflowHistoricTaskInstanceDto)

Example 29 with WorkflowFilterDto

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;
}
Also used : WorkflowFilterDto(eu.bcvsolutions.idm.core.workflow.model.dto.WorkflowFilterDto) WorkflowProcessInstanceDto(eu.bcvsolutions.idm.core.workflow.model.dto.WorkflowProcessInstanceDto)

Example 30 with WorkflowFilterDto

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;
}
Also used : WorkflowFilterDto(eu.bcvsolutions.idm.core.workflow.model.dto.WorkflowFilterDto) WorkflowProcessInstanceDto(eu.bcvsolutions.idm.core.workflow.model.dto.WorkflowProcessInstanceDto)

Aggregations

WorkflowFilterDto (eu.bcvsolutions.idm.core.workflow.model.dto.WorkflowFilterDto)51 WorkflowTaskInstanceDto (eu.bcvsolutions.idm.core.workflow.model.dto.WorkflowTaskInstanceDto)39 AbstractCoreWorkflowIntegrationTest (eu.bcvsolutions.idm.core.AbstractCoreWorkflowIntegrationTest)36 IdmIdentityDto (eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto)36 Test (org.junit.Test)36 IdmConceptRoleRequestDto (eu.bcvsolutions.idm.core.api.dto.IdmConceptRoleRequestDto)35 IdmIdentityContractDto (eu.bcvsolutions.idm.core.api.dto.IdmIdentityContractDto)35 IdmRoleDto (eu.bcvsolutions.idm.core.api.dto.IdmRoleDto)35 IdmRoleRequestDto (eu.bcvsolutions.idm.core.api.dto.IdmRoleRequestDto)35 List (java.util.List)27 ArrayList (java.util.ArrayList)25 IdmNotificationLogDto (eu.bcvsolutions.idm.core.notification.api.dto.IdmNotificationLogDto)24 IdmNotificationFilter (eu.bcvsolutions.idm.core.notification.api.dto.filter.IdmNotificationFilter)24 Transactional (org.springframework.transaction.annotation.Transactional)11 WorkflowProcessInstanceDto (eu.bcvsolutions.idm.core.workflow.model.dto.WorkflowProcessInstanceDto)7 IdmRoleGuaranteeDto (eu.bcvsolutions.idm.core.api.dto.IdmRoleGuaranteeDto)6 WorkflowHistoricProcessInstanceDto (eu.bcvsolutions.idm.core.workflow.model.dto.WorkflowHistoricProcessInstanceDto)3 IdmIdentityRoleDto (eu.bcvsolutions.idm.core.api.dto.IdmIdentityRoleDto)2 IdmIdentityRoleFilter (eu.bcvsolutions.idm.core.api.dto.filter.IdmIdentityRoleFilter)2 ResultCodeException (eu.bcvsolutions.idm.core.api.exception.ResultCodeException)2