3 Replies Latest reply on Apr 23, 2008 5:41 PM by Ronald van Kuijk

    Detaching process definition from hibernate

    Jon Walton Newbie

      Hello,

      The throughput requirements of my application dictate that I do not persist process instances in my database. It simply processes too many process instances per second. I would however, still like to use the database to store process definitions, so I can use the webapp for process definition deployment.

      For example:

      // Get PD from the DB
      pd = jbpmContext.getGraphSession().findLatestProcessDefinition(name);
      
      // Create a new PI
      pi = new ProcessInstance(pd);


      The problem I have is that the process instance created still contains some collections which are lazy-loaded and when the process instance is accessed later, I get a lazy load exceptions. (Trying to explicitly load all possible fields of the process def still did not fix things, since some collections remain empty)

      Is there any way to somehow detach the process definition so it can be used outside the hibernate context? There do not appear to be any methods to turn a process definition back into an XML string. One solution is to just use XML files for process definition deployment, but that takes away many of the nifty features such as hot-deployment of process definitions and process definition versioning support.

      Thanks for the help.