use of org.jbpm.services.api.AdvanceRuntimeDataService.TASK_ATTR_STATUS in project droolsjbpm-integration by kiegroup.
the class RuntimeDataServiceBase method queryProcessesByVariables.
public ProcessInstanceCustomVarsList queryProcessesByVariables(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 convertToProcessInstanceCustomVarsList(advanceRuntimeDataService.queryProcessByVariables(convertToServiceApiQueryParam(filter.getAttributesQueryParams()), convertToServiceApiQueryParam(filter.getProcessVariablesQueryParams()), queryContext));
}
return convertToProcessInstanceCustomVarsList(advanceRuntimeDataService.queryProcessByVariablesAndTask(convertToServiceApiQueryParam(filter.getAttributesQueryParams()), convertToServiceApiQueryParam(filter.getProcessVariablesQueryParams()), convertToServiceApiQueryParam(filter.getTaskVariablesQueryParams()), getOwnersQueryParam(filter), queryContext));
}
Aggregations