Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1199993

Summary: No results from Process Query API when I query process instances with 2 or more variables
Product: [Retired] JBoss BPMS Platform 6 Reporter: Ivo Bek <ibek>
Component: Business CentralAssignee: Shelly McGowan <smcgowan>
Status: CLOSED EOL QA Contact: Lukáš Petrovický <lpetrovi>
Severity: high Docs Contact: Dawn Eisner <deisner>
Priority: high    
Version: 6.1.0CC: agiertli, kverlaen, lpetrovi, mczernek, rrajasek
Target Milestone: DR1Keywords: Reopened
Target Release: 6.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
When multiple variables are given for the same query parameter, the query will then search for any results that match one or more of the values entered. However, when logical operations and grouping of values is required (i.e. AND, OR, and such), the search provides no results. There are no workarounds for this issue at this stage.
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-27 19:35:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ivo Bek 2015-03-09 13:22:29 UTC
Description of problem:

I have a process definition with 2 process variables, var1 and var2. I start few process instances with different values for var1 and var2 and when I want to query one particular process instance with var1=value1 and var2=value2 I do the following request:

http://localhost:8080/business-central/rest/query/runtime/process?processinstancestatus=1&var_var1=value1&var_var2=value2&

However, I get no results from this request:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?><query-process-instance-result/>

I will add a comment linking to the reproducer.



Requesting blocker since this issue needs to be fixed in regard to BPMSPL-84.

Comment 3 Marco Rietveld 2015-03-16 15:07:13 UTC
The preliminary documentation that I added here:
- https://github.com/mrietveld/droolsjbpm-integration/wiki/jBPM-Rest-Query-API

states the following: 

"all of the query parameters described below can be entered multiple times: when multiple values are given for the same query parameter, the query will then search for any results that match one or more of the values entered."

which supports this bug request. 

However, multiple "variable value" parameters require that the underlying query functionality supports "grouping" because the "variable value" parameter (i.e. <variableName> = <string> AND <variableValue> = <string>) actually describes multiple criteria. 

Adding support for "grouping" criteria is non-trivial.

Comment 4 Ivo Bek 2015-12-07 12:51:13 UTC
Probably, this will be supported in jBPM 7 - when advanced querying is implemented

Comment 5 Marco Rietveld 2015-12-09 12:42:04 UTC
Reopened, since I'm working on implementing this for community 6.4.

Comment 6 Marco Rietveld 2015-12-09 12:52:37 UTC
*** Bug 1257956 has been marked as a duplicate of this bug. ***

Comment 7 Marco Rietveld 2015-12-14 20:36:54 UTC
PR submitted: https://github.com/droolsjbpm/droolsjbpm-integration/pull/255

Comment 8 Marco Rietveld 2015-12-18 18:49:18 UTC
Fixed. Commits: 

master: 
https://github.com/droolsjbpm/droolsjbpm-integration/commit/488d7447

Comment 9 Tomas Livora 2016-04-06 11:08:35 UTC
Verified on BPM Suite 6.3.0 ER2