Async deletion of process instances through historic query doesn't support `skipIoMappings`

Hi everyone!

I am facing the following issue whilst trying to delete old process instances through the REST API using Delete Async Historic Query Based (POST):

org.camunda.bpm.engine.ProcessEngineException: Unknown property used in expression: ${someName}. Cause: Cannot resolve identifier 'someName'

What I found so far is a thread in the forum which resulted in the following ticket CAM-6749. But it only allows to use the skipIoMappings option if using the regular DELETE REST API call. However, I would like to delete a lot of old process instances and would like to batch them, but there is no option to specify skipIoMappings when using the async historic query based deletion.

Camunda version: 7.10

Any suggestions will be appreciated!

1 Like

Correct me if I am wrong, but it looks like it is possible to support skipIoMappings with the Delete Async Historic Query Based. The batch job eventually will call RuntimeService.deleteProcessInstances(List<String> processInstanceIds, String deleteReason, boolean skipCustomListeners, boolean externallyTerminated, boolean skipSubprocesses); which spawns a new DeleteProcessInstancesCmd that performs process instance deletion for each of the processInstanceIds. Each individual process instance deletion can accept skipIoMappings flag which is now set false.

So if the flag is propagated all the way down from the DeleteProcessInstancesDto through the DeleteProcessInstanceBatchConfiguration it can be used instead of the (let’s say) hardcoded flag value.

You’ve using a very old version of Camunda - are you able to confirm that this still happens in the latest version 7.15?

Unfortunately, I am not able to confirm that this happens in version 7.15 by actually executing the REST call against engine with such a version. But referring to the source code for 7.15 it doesn’t look like it is supported.
Neither the REST call expect such option in the request body, nor it is processed later on by the DeleteProcessInstancesJobHandler that delegates the work to the service responsible for the deletion. And it is still hardcoded as false when the deletion of each process instance takes place.