12-10-2017 03:08 AM
Hi Everyone,
I am trying to fetch the all open tasks with variables from activiti engine using task query. I am using version 5.19.0.
I see in TaskEntityManager.findTasksAndVariablesByQueryCriteria(), the max result is limited to 20000.
Even if I try to fetch result in pages, this will still restrict me to 20k.
Is there any way I can fetch task with variable after 20k record without using native sql.
Thanks
-Vishal
12-10-2017 05:40 AM
Hi vgaur_.
I also encountered the same problem that cannot use sql paging with includeTaskLocalVariables・includeProcessVariables.
I solved this problem by the following pull request. This was merged in Activiti 5.22.0 version.
https://github.com/Activiti/Activiti/pull/891
With includeTaskLocalVariables・includeProcessVariables false, I divided into two queries.
1. First query get tasks.
2. Second query get variables by taskIds().
TaskService.getVariableInstancesLocalByTaskIds(Set<String> taskIds)
https://www.activiti.org/javadocs/org/activiti/engine/TaskService.html#getVariableInstancesLocalByTa...
Explore our Alfresco products with the links below. Use labels to filter content by product module.