Yes, in my opinion a store procedure is the best option for archiving old data that is not needed anymore.
Wondering if anyone else has run up against the same thing and implemented purging for completed processes?
It is standard functionality in jBPM3 that all completed processes (history information) remains in the database. It is stated in the docs (enterprise docs) that you need to decide within your organization what you want to do with this, something like this:
- don't care about old history, just remove/delete.
- have BAM reporting in place so have to keep, then migrate out to a different format/location/db to allow for continued reporting.
- apply enterprise process (for example, I worked in an enterprise that applied data warehousing techniques) to collect and store for reporting all history data
- leave it in place, but be prepared to eventually have to enlarge your DB machine! ;-)
That about covers it. I looked at your doc, but I am not sure anymore exactly what you all can clean out of your tables.