Run-time Case Execution data not getting cleared from _ru_ tables


I have multi-tenancy setup with shared engine. When a case is completed or terminated records from ‘act_ru_case_execution’ and ‘act_ru_variable’ are not getting deleted. Task level variable data does get cleared on task completion but not the process level data.

This only happens with a multi-tenancy setup with shared engine. According to the documentation the engine should automatically clean up the run-time tables on case completion. Is there any configuration or anything to set to clear out the data while using shared engine process?


Update to my question. What I have noticed is that on Cmmn Case completion/terminate the Cmmn engine doesn’t delete the Case (top level) execution record from ‘act_ru_case_execution’ table and the corresponding variables for this case/record from the ‘act_ru_variable’. All the child executions(task, stage etc) and corresponding variables gets cleared.

This behavior is different from Bpmn process/engine. For Bpmn process all the process and variables data gets deleted on completion from the run time tables.

Is this by design or is it a bug? Does it have anything to do with History turned off?


Do you close the case instance? Can you please provide a test case that reproduces the behavior?


Thank you, that helped for scenarios where complete/terminate is issued by a user action (via calling the api).

How can we achieve the same when the engine completes the case. There are various scenarios where completing a task or stage can result in case completion. Looks like in this scenario engine will have to issue complete and then close command. Is there some setting for this? Engine does fire a complete event but it’s not possible to issue a close while complete processing is on-going.


Im using CMMN inside of my process models. Hence the process model uses a ‘call activity’ to initiate the case. The following task is a service task to call the close case API. Hence once the case is complete, it returns control back to the calling process which can then close it completely…




In my case we are building stand alone CMMN processes. I am guessing there’s got be some setting of sort to do this because otherwise data will grow quickly on these run time tables which will eventually impact performance.