Bug 1260881 - [QE](6.2.z)REST Query API: startDate and endDate parameters do not work
Summary: [QE](6.2.z)REST Query API: startDate and endDate parameters do not work
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: Business Central
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: CR2
: 6.2.1
Assignee: Shelly McGowan
QA Contact: Radovan Synek
URL:
Whiteboard:
Depends On:
Blocks: 1288023 1295529
TreeView+ depends on / blocked
 
Reported: 2015-09-08 07:09 UTC by Tomas Livora
Modified: 2020-03-27 19:41 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
: 1295529 (view as bug list)
Environment:
Last Closed: 2020-03-27 19:41:22 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomas Livora 2015-09-08 07:09:54 UTC
Description of problem:
When you use a process query containing either startDate or endDate as a single parameter, no process instances will be found.

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

Steps to Reproduce:
1. Deploy and run a process.
2. Try http://localhost:8080/business-central/rest/query/runtime/process?startDate_min=*ENTER_TODAY_HERE*
3. See that there is a single result.
4. Try http://localhost:8080/business-central/rest/query/runtime/process?startDate=*ENTER_TODAY_HERE*

Actual results:
There is no result.

Expected results:
The process instance started in step 1 should be returned.

Additional info:
Note that all date range parameters (startDate_min, startDate_max, endDate_min, endDate_max) seem to be working as expected.

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

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

master: 
https://github.com/droolsjbpm/droolsjbpm-integration/commit/3c098ab7

Comment 4 Marco Rietveld 2016-01-05 13:28:15 UTC
PR Submitted: https://github.com/droolsjbpm/droolsjbpm-integration/pull/258

Comment 5 Marco Rietveld 2016-01-07 13:53:01 UTC
Fixed. Commits: 

6.3.x: 
https://github.com/droolsjbpm/droolsjbpm-integration/commit/bc7b6f41

Comment 6 Radovan Synek 2016-01-19 17:02:39 UTC
Unfortunately, the behaviour is still the same - parameters like startDate_min,startDate_max,endDate_min,endDate_max work and I am able to receive correct results. However, using parameters startDate or endDate results in an empty collection of process instances.

This could be caused by the fact that the startDate parameter has been specified in a format 'yy-MM-dd' - i.e. not providing exact time when the process started ('HH:mm:ss.SSS' part is missing), simple requesting all process instances that have been started in a single day.

Please see a PR with tests:
https://github.com/droolsjbpm/droolsjbpm-integration/pull/268

Additional info:
a format 'yy-MM-dd_HH:mm:ss' results in a bad request error, forcing user to provide also '.SSS' part. Usually, user doesn't care about milliseconds.

Comment 7 Marco Rietveld 2016-01-25 12:03:04 UTC
For 6.2 I'll add an additional fix so that "yy-MM-dd_HH:mm:ss" does not cause a bad result error, but results in the nanoseconds being set to ".000". 

The reason for this is that changing the behavior of the feature is not something we do for established builds. The documentation states the following: 

"Submitting only the date (yy-MM-dd) means that a time of 00:00:00 is used (the beginning of the day). "

(See https://access.redhat.com/documentation/en-US/Red_Hat_JBoss_BPM_Suite/6.2/html/Development_Guide/chap-Remote_API.html#idp14908488) 

For 6.3, which has not yet been released, I will try to change the behaviour to do hat Radovan suggests, which is a much more logical and user-friendly variant (submitting "yy-MM-DD" retrieves _all_ process instances retrieved that day, or in other words, is equivalent to startDate_min="yy-MM-DD"&&startDate_max="yy-MM-DD+1" ).

Comment 8 Marco Rietveld 2016-01-25 15:17:31 UTC
Pull request added: 

https://github.com/droolsjbpm/droolsjbpm-integration/pull/274

Comment 9 Marco Rietveld 2016-01-25 17:08:03 UTC
Fixed. Commits: 

6.3.x: 
https://github.com/droolsjbpm/droolsjbpm-integration/commit/09263cca

Comment 10 Radovan Synek 2016-02-03 09:48:19 UTC
Verified with BPMS-6.2.1.CR2.

However, the behaviour still differs from the expectations in the original description - see details in comment 7.


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