Unexpected result when querying historic task instances in Flowable 7.0.1
jin2001 opened this issue · 1 comments
Hi all,
I have found what it could be a bug in the recent 7.0.1 version. When using HistoryService to query historic task instances, it's using or instead of and for the query criteria.
I run a query with three criterias by using the below code:
HistoricTaskInstanceQuery historicTaskInstanceQuery = this.historyService.createHistoricTaskInstanceQuery()
.taskAssignee("user1")
.taskCompletedAfter("2024-07-25")
.taskCompletedBefore("2024-07-28")
.list();
I expect the search to look for criteria1 AND criteria2 AND criteria3, as follows:
assignee_ = "user1" AND end_time_ > "2024-07-25" AND end_time_ < "2024-07-28"
But in the logs,the SQL generated is as follows:
SELECT RES.* from ACT_HI_TASKINST RES WHERE RES.ASSIGNEE_ = ? and RES.END_TIME_ is not null or RES.END_TIME_ < ? or RES.END_TIME_ > ?...............