AnsweredAssumed Answered

Why RuntimeService.deleteProcessInstance() do one by one db call for variables select and deletes?

Question asked by swamy2156 on Nov 25, 2015
Latest reply on Nov 25, 2015 by trademak
Hi,

I recently upgraded Activiti to 5.19 and enabled bulkInsertEnabled in processEngineConfiguration.
I really like this feature and thanks for providing which really improved performance of my app.
I am using RuntimeService.deleteProcessInstance() to delete a processInstance. I got few queries and putting here to clear.
As part of delete process instance
1) collecting ACT_RU_VARIABLE s one by one using select query by ID_ for process instance. Why activiti is not collecting all at once(using processInstanceId or executionId) at this step?
2) its deleting ACT_RU_VARIABLE one by one instead of bulk delete(using processInstanceId or executionId). Is there a way to delete all in one shot to minimise db calls?

Outcomes