Bug 1174828 - Unknown and unsupported (composed) query params in REST API
Summary: Unknown and unsupported (composed) query params in REST API
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: Business Central
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: ER6
: 6.1.0
Assignee: Shelly McGowan
QA Contact: Ivo Bek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-12-16 14:53 UTC by Ivo Bek
Modified: 2020-03-27 19:42 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-27 19:42:49 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Ivo Bek 2014-12-16 14:53:42 UTC
Description of problem:

According to https://github.com/mrietveld/droolsjbpm-integration/wiki/jBPM-Rest-Query-API ... it should be possible to use parameters like: var_myobject, enddate_min, startdate_min, enddate_max, varregex_myobject, and others but when I use any of them, the request will fail with:

Exception thrown when processing request [/query/runtime/process?processinstancestatus=1&startdate_max=15:39:13&]; responding with status 400: org.kie.remote.services.rest.exception.KieRemoteRestOperationException: startdate_max is an unknown and unsupported query param for the /business-central/rest/query/runtime/process operation.
	at org.kie.remote.services.rest.exception.KieRemoteRestOperationException.badRequest(KieRemoteRestOperationException.java:104) [kie-remote-services-6.2.0.CR3-redhat-1.jar:6.2.0.CR3-redhat-1]
	at org.kie.remote.services.rest.QueryResourceImpl.checkIfParametersAreAllowed(QueryResourceImpl.java:164) [kie-remote-services-6.2.0.CR3-redhat-1.jar:6.2.0.CR3-redhat-1]
	at org.kie.remote.services.rest.QueryResourceImpl.queryProcessInstances(QueryResourceImpl.java:77) [kie-remote-services-6.2.0.CR3-redhat-1.jar:6.2.0.CR3-redhat-1]
	at org.kie.remote.services.rest.QueryResourceImpl$Proxy$_$$_WeldClientProxy.queryProcessInstances(QueryResourceImpl$Proxy$_$$_WeldClientProxy.java) [kie-remote-services-6.2.0.CR3-redhat-1.jar:6.2.0.CR3-redhat-1]


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 4 Marco Rietveld 2015-01-19 16:09:50 UTC
One more commit for a test fix. Commits: 

6.2.x:
https://github.com/droolsjbpm/droolsjbpm-integration/commit/c1ac7234

master:
https://github.com/droolsjbpm/droolsjbpm-integration/commit/db756fd0

Comment 5 Ivo Bek 2015-02-17 12:39:20 UTC
Verification failed in BPMS 6.1.0.ER5

The issue persists, see:

responding with status 400: org.kie.remote.services.rest.exception.KieRemoteRestOperationException: varregex_myobj is an unknown and unsupported query param for the /business-central/rest/query/runtime/task operation

I believe that's because "checkSpecial" parameter is not set to true in runtime/task and runtime/process operations during checkIfParametersAreAllowed(params, QueryResourceData.getQueryParameters(), oper);

I would say that there should be:

checkIfParametersAreAllowed(params, QueryResourceData.getQueryParameters(), true, oper);

on these places:

https://github.com/droolsjbpm/droolsjbpm-integration/blob/c724f38f5aa98eb2f4420481298d880ea4af71a5/kie-remote/kie-remote-services/src/main/java/org/kie/remote/services/rest/QueryResourceImpl.java#L60

https://github.com/droolsjbpm/droolsjbpm-integration/blob/c724f38f5aa98eb2f4420481298d880ea4af71a5/kie-remote/kie-remote-services/src/main/java/org/kie/remote/services/rest/QueryResourceImpl.java#L78

Comment 6 Marco Rietveld 2015-02-17 15:36:54 UTC
Ivo, good catch, thank you for taking the time to find the cause as well!

Also, my apologies: this was a stupid mistake! 

Fixed. Commits: 

6.2.x: 
https://github.com/droolsjbpm/droolsjbpm-integration/commit/caf0a03c

master: 
https://github.com/droolsjbpm/droolsjbpm-integration/commit/4b0c075b

Comment 7 Ivo Bek 2015-03-05 15:11:38 UTC
Verified in BPMS 6.1.0.ER6


Note You need to log in before you can comment on or make changes to this bug.