use of org.jbpm.casemgmt.api.AdvanceCaseRuntimeDataService.TASK_ATTR_STATUS in project droolsjbpm-integration by kiegroup.
the class CaseManagementRuntimeDataServiceBase method queryCasesByVariables.
public CaseInstanceCustomVarsList queryCasesByVariables(String payload, String payloadType, QueryContext queryContext) {
SearchQueryFilterSpec filter = new SearchQueryFilterSpec();
if (payload != null) {
filter = marshallerHelper.unmarshal(payload, payloadType, SearchQueryFilterSpec.class);
}
List<String> params = filter.getAttributesQueryParams().stream().map(e -> e.getColumn()).collect(toList());
params.removeAll(asList(TASK_ATTR_NAME, TASK_ATTR_OWNER, TASK_ATTR_STATUS));
if (params.size() == filter.getAttributesQueryParams().size() && filter.getTaskVariablesQueryParams().isEmpty()) {
return convertToCaseInstanceCustomVarsList(advanceCaseRuntimeDataService.queryCaseByVariables(convertToServiceApiQueryParam(filter.getAttributesQueryParams()), convertToServiceApiQueryParam(filter.getCaseVariablesQueryParams()), queryContext));
} else {
return convertToCaseInstanceCustomVarsList(advanceCaseRuntimeDataService.queryCaseByVariablesAndTask(convertToServiceApiQueryParam(filter.getAttributesQueryParams()), convertToServiceApiQueryParam(filter.getTaskVariablesQueryParams()), convertToServiceApiQueryParam(filter.getCaseVariablesQueryParams()), filter.getOwners(), queryContext));
}
}
Aggregations