Delete old processes and due task

Good morning.
I’m trying to delete old processes by specifying a specific date with Rest API. I would also like to eliminate expired tasks. I have tried with the following REST operations:

POST /process-instance/delete
DELETE /process-instance

POST process-instance/delete
DELETE /process-definition

This one gives me the following error:

{
“type”: “ProcessEngineException”,
“message”: “Unknown property used in expression: #{(variable)}. Cause: Cannot resolve identifier ‘variable’”
}

I hope you could help me.

Regards.

Did you found solution?

Try to use:

https://docs.camunda.org/manual/7.14/reference/rest/process-instance/delete/

with skipIoMappings set to “true”

More explanations can be found here:

https://jira.camunda.com/browse/CAM-6749