Hard deleting process instances

Hi,

I have a test requirement where i need to create multiple instances and then delete them along with data.
Camunda API provides only soft-delete feature.
Can anyone provide a workaround for doing this, if any service is there…or the order of deletion from database tables.

Thanks,
Anshul

What do you mean by soft delete? Deleting process instances will result in removing runtime instance from runtime data tables and moved to history tables.

When deleted from console, the instance still reflects in DB under - tables PROCINST, ACTINST, JOB tables.

Hi @aasthana4, the below tables are history tables which is used for audit purpose, actually when you delete process instance it will be removed from ACT_RU_+ tables(runtime tables). When removing processes or updating processes or creating processes also will have entry in ACT_HI_+ tables(history tables).

If you don’t want history data then you can set historyLevel=none

<property name="history">none</property>

For more details, refer set-the-history-level.

i have similar requirement here…
whenever there is a live deployment, we create few test instances and delete them after we have tested the functionality…
but they come in report like- number of orders created today, cancelled orders etc…
i dont want them to come in any report. i want to delete them in a way they never existed.
is there a way to do it? or only through backend the history table records will have to be deleted?