How to Improve performance of deleteProcessInstance api ?

cancel
Showing results for 
Search instead for 
Did you mean: 
shailesh257
Member II

How to Improve performance of deleteProcessInstance api ?

Hi,
We are using Activiti version 6.0.0 java API (Integrated via spring) with History level - AUDIT. We have a service which creates around 0.5M process instances per day and based on some condition we also close those process instances via runtimeService.deleteProcessInstance method. We want to optimize the performace of runtimeService.deleteProcessInstance, currently it takes considerable amount of time to terminate one process instance (around 1 secs). Around 40 queries are fired. Please suggest a way to improve the performance.

Is there a way we can achieve batching for this ?.

We also tried via multiple threads but we observed very high CPU utilization. Also we need to terminate process instances in bulk and in a single transaction.

Please note that we cannot reduce History level below AUDIT as we need audit data from ACT_HI_TASKINST table.

Let me know if you need any other info from me.


Shailesh Jain