cancel
Showing results for 
Search instead for 
Did you mean: 

counting HistoricTaskInstance

r3dge
Champ in-the-making
Champ in-the-making
Hi,

I'm trying to figure out how to count historic task instance.


List<HistoricTaskInstance> taches = pe.getHistoryService().createHistoricTaskInstanceQuery().taskDefinitionKey(TaskDefinitionKey).taskCreatedOn(date).list();


-> Return nothing.


List<HistoricTaskInstance> taches = pe.getHistoryService().createHistoricTaskInstanceQuery().taskDefinitionKey(TaskDefinitionKey).taskCreatedBefore(dayAfter).taskCreatedAfter(dayBefore).list();


-> return a result

It looks like a bug. What's wrong ?
2 REPLIES 2

jbarrez
Star Contributor
Star Contributor
The taskCreatedOn is very exact (depending on database timestamp resolution). So you're only going to get the tasks for that specific millisecond. Did you verify that the timestamp in the db is the exact (to the millisecond) of what you're passing as param?

r3dge
Champ in-the-making
Champ in-the-making
I was trying to search on a specific simple date (without time). Now i understand the result.

Thanks !