cancel
Showing results for 
Search instead for 
Did you mean: 

Completing multi-instance task is very slow, takes hours to complete each task when multi-instance has 1000+ tasks

vamsimp
Champ in-the-making
Champ in-the-making
Hello, We have a workflow with a multi-instance task and the multi-instance task is having between 2000 to 4000 running tasks. When we try to complete one of the task when there are thousands of multi-instance tasks running, it is taking hours to complete.
We investigated a bit and it looks like activiti is getting the parent execution and checking all the tasks present on the parent execution, probably to determine whether it should go to the next stage.

We are using the below API call.

taskService.completeTask(taskId)

The same completes quickly for single instance tasks or when there are very few tasks for the multi-instance task.

Any help in resolving this is appreciated.

Thanks,
Vamsi
3 REPLIES 3

vamsimp
Champ in-the-making
Champ in-the-making
Can someone please answer the query

jbarrez
Star Contributor
Star Contributor
A multi instance task with thousands of instances … is not really what it was built for…. I can see why it would be slow .. indeed for determining if the MI is completed or not.

vamsimp
Champ in-the-making
Champ in-the-making
Thanks for your reply. But even a multi instance with just around 200 tasks in taking around 2 mins to complete. Is there any workaround to make it work faster?