2 Replies Latest reply on Aug 8, 2008 3:45 AM by lblaauw

    purge data after processinstance reaches end ?

    lblaauw

      Hi,

      Just a quick question... As it stands right now in our application when all tasks of a process instance have ended i see in the db a date filled in at the process instance end_ table. Thats great but what we really want to do is purge all data from the db belonging to that process instance, so all variables, comments, taskinstances etc etc...

      To me it seems this should be the default behaviour for jBPM anywayz to keep the jBPM operational db as small and lean as possible for performance reasons. So if you want to save your data after process end you as a developer are responsible for archiving it somewhere somehow..

      Can anybody provide some insight on this ?

      Greetings,
      Leo

        • 1. Re: purge data after processinstance reaches end ?
          vtysh

          jbpmContext.getGraphSession().deleteProcessInstance(processInstance);

          • 2. Re: purge data after processinstance reaches end ?
            lblaauw

            Hey,

            Yeah I am aware of this function call, question remains though where to call it.. Ideally I would like the process at the end to purge its own data. Offcourse it could be purged through an external process running outside of jBPM but thats not really a great way in my view, i.e. another process to worry about..

            So I will try from the process end, but no idea what will happen if a process purges its own data right before it ends ?

            Regards and thanks for your reply,

            Leo

            "vtysh" wrote:
            jbpmContext.getGraphSession().deleteProcessInstance(processInstance);