2 Replies Latest reply on Mar 17, 2009 5:09 AM by aguizar

    Clean jbpm Database ?

    tvraghavan

      The jbpm tables jbpm_variableinstance, jbpm_bytearray, jbpm_byteblock, jbpm_log has more than 10L records now.

      I believe the completed processinstance are identified with jbpm_processinstance with a end_ date.

      Is there any documentation on the sequence that needs to followed to clean up the associated tables?

      Thanks in advance

      -tvraghavan

        • 1. Re: Clean jbpm Database ?
          kukeltje

          uhhmmm.... if you use e.g. hibernate, it will do it for you. Is a lot easier

          • 2. Re: Clean jbpm Database ?
            aguizar

            You can call GraphSession.deleteProcessInstance on each instance you want to remove. Note that this method is somewhat slow due to cascading.

            If you want mass deletion you can analyze the order of the statements executed by deleteProcessInstance and write a SQL script.