Bug 1070878 - It is not possible to query tasks with status InProgress using REST API
Summary: It is not possible to query tasks with status InProgress using REST API
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: jBPM Core
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ER1
: 6.0.2
Assignee: Marco Rietveld
QA Contact: Ivo Bek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-27 16:10 UTC by Anton Giertli
Modified: 2018-12-05 17:28 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Using the REST API, it was not possible to execute any queries that had the status of InProgress. The server would return a BAD_REQUEST flag in response to the query with a message saying that the status “Inprogress is not a valid status type for a task”. This issue was caused due to the lack of a method that didn't transform the string input to the correct corresponding value of enum and has now been fixed by the addition of this method.
Clone Of:
Environment:
Last Closed: 2014-08-06 19:49:45 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Anton Giertli 2014-02-27 16:10:50 UTC
Description of problem:
Currently, it is not possible to call following REST API method
http://localhost:8080/business-central/rest/task/query?status=inprogress

The output is
<response>
<status>BAD_REQUEST</status>
<url>
/business-central/rest/task/query?status=inprogress
</url>
<error>Inprogress is not a valid status type for a task.</error>
</response>

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


How reproducible:
always

Steps to Reproduce:
1. Deploy process with human task
2. Clam/start this task so it will be in status InProgress
3. Call http://localhost:8080/business-central/rest/task/query?status=inprogress

Actual results:

Error can be observed
Inprogress is not a valid status type for a task.
Expected results:

List of task with status InProgress will be returned
Additional info:

Comment 2 Marco Rietveld 2014-03-04 14:32:22 UTC
Fixed on master: 

https://github.com/droolsjbpm/droolsjbpm-integration/commit/3bc1d0ec

Thanks to Anton for catching the issue and coding most of the fix. 

Waiting for flags to commit to 6.0.x.

Comment 3 Marco Rietveld 2014-03-19 13:02:16 UTC
Cherry-picked to 6.0.x: 
https://github.com/droolsjbpm/droolsjbpm-integration/commit/d30d2d9b

Comment 4 Ivo Bek 2014-04-29 14:17:36 UTC
Verified in BPMS 6.0.2.ER2

The example response for 'business-central/rest/task/query?status=inprogress' is:

{"task-summary-list":["org.kie.services.client.serialization.jaxb.impl.task.JaxbTaskSummaryListResponse",{"index":null,"taskSummaryList":["java.util.ArrayList",[{"task-summary":{"id":24,"name":"Hello","subject":"","description":"","status":"InProgress","priority":0,"skipable":true,"actual-owner":"ibek","created-by":"ibek","created-on":["java.sql.Timestamp",1398780895584],"activation-time":["java.sql.Timestamp",1398780895584],"process-instance-id":139,"process-id":"org.jboss.qa.bpms.HumanTask","process-session-id":1,"parent-id":0}}]]}]}


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