cancel
Showing results for 
Search instead for 
Did you mean: 

Delete running process from activiti database

yangyang_qian
Champ in-the-making
Champ in-the-making
We're currently trying to keep our Activiti db (oracle) in synch with another oracle db that tracks request details … so for example if someone starts a process with a business key, the key is used as the unique identifier for the process in the Activiti db, and the misc information in the other db.

Sometimes I find that I need to delete a process from the Activiti db to keep it in synch with the other db and vice versa (as a maintenance task) … I was hoping to delete the records from the Activiti side by just going through all the tables and deleting the corresponding rows.

I know that running processes exist in ACT_RU_EXECUTION … and older finished ones are moved to the various ACT_HI_ tables … but I'm kind of at a loss as to which tables I'll need to touch in order to totally scrub a process from the Activiti (given a business key to start with).

Don't suppose there's a schema diagram out there?
1 REPLY 1

frederikherema1
Star Contributor
Star Contributor
Safest is to use the API for this.. There is a method on the HistoryService that TOTALLY deletes a historic process instance (cascading everything that needs to be deleted). Beware, first delete the runtime-instance (if still running) otherwise you'll get an exception that you can't delete a HPInstance when an it's ProcessInstance counterpart still exists.