1 Reply Latest reply on Jul 9, 2013 3:52 AM by Maciej Swiderski

    Restoring and continuing a jPBM5 ProcessInstance

    mvermand Newbie

      Hi,

       

      After a few years of using JBPM4, we are evaluating JBPM5.

      In our project we have lots of long-running processes, so we need to persist them.

      We want a tight integration with our application and therefore we decided not to use Guvnor (maybe we should non the less?).

       

      Anyway, at the moment we use one ksession per process instance.

      Now I am wondering how to "revive" the kbase which is needed to load the ksession:

       

      ksessionStatefull = JPAKnowledgeService.loadStatefulKnowledgeSession(sessionId, kbase, null, env);

       

      As process instances can last days or weeks, it is quit possible that process definitions have been altered,

      so to continue a ksession we need to restore the same kbase as used to start the session (we need to know version of the process definition which was used when creating the process instance), right?

       

      (How) should we store the kbase which is needed to reload the ksession?

       

      Thanks!

       

      Michiel

        • 1. Re: Restoring and continuing a jPBM5 ProcessInstance
          Maciej Swiderski Master

          There are in fact several options where two of them are the most common:

          1. keep your assets managed as part of your application - meaning that your application must keep track of what shall be put into what kbase and deal with eventual changes to the processes
          2. build binary packages that are loaded when ever they are needed that way you can avoid issues with changes to the definitions as they are already in binary format so should not change (unless you explicitly override them)

          HTH