2 Replies Latest reply on Dec 7, 2005 7:06 PM by Ronald van Kuijk

    How to purge stale entries from database?

    Michael Holtzman Newbie

      Greetings. I was wondering if there is an API to tidy up the database. For example, to delete process instances that completed before a given date, remove process definitions that are obsolete and have no active instances, etc.

      Thanx.

        • 1. Re: How to purge stale entries from database?
          Sean Newbie

          I use this to clean up my development database of all process instances.

          begin work;
          delete from jbpm_comment;
          delete from jbpm_variableinstance;
          delete from jbpm_tokenvariablemap;
          delete from jbpm_moduleinstance;
          delete from jbpm_log;
          delete from jbpm_token;
          delete from jbpm_processinstance;
          commit work;

          This doesn't answer your question, I know, but it is how I keep things clean so the failed experiments don't create too much noise.

          • 2. Re: How to purge stale entries from database?
            Ronald van Kuijk Master

            Michael,

            No there is no api (yet) nor a ui for this. The webapp can be easily extended in the admin part (currently there is nothing). Develop a page (jsf based), develop a backingbean and implement a simple hibernate query that deletes the pi's. I currently do not have the time to show you, but it should not take more than an hour to build something like this. I can give you my bank account number for the weekend however :-)