0 Replies Latest reply on Aug 27, 2013 9:33 PM by jamesbeam

    Using a persisted statefulknowledgesession with knowledgeagent?

      Hello, I am using jBPM 5.4 with persistence and have long running processes and make make changes to the knowledge base periodically (via drools guvnor 5.5). I use JPAKnowlegeService.loadStatefulKnowledgeSession(...) to retrieve my existing knowledge session.  When I make a change to the rule base (via drools 5.5 guvnor) and then try to restart my application (and reload the knowledgesession) I get an exception:

       

      java.lang.RuntimeException: Unable to load session snapshot

           at org.drools.persistence.SessionMarshallingHelper.loadSnapshot(SessionMarshallingHelper.java:96)

      .

      .
      Caused by: java.lang.NullPointerException

          at org.drools.common.Scheduler$activationTimerInputMarshaller.deserialize(Scheduler.java:230)

       

      I am NOT currently using a KnowledgeAgent and it seems like it should be able to help.  I have read over the drools forum and this one and see a few discussions on the topic (Re: persisted stateful sessions and knowledge base changes) but nothing concrete to put me on the right path.

       

      The examples with knowledgeagent I have found assume that I am calling: StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();

       

      Can someone please show/explain how I can reload an existing persisted knowledgesession given changes in my knowledge base?  (for example, can the knowledgeagent and JPAKnowlegeService.loadStatefulKnowledgeSession be used together?  If not, do I load the existing statefulknowledgesession by some other means?)

       

      I am using Spring-based configuration, but any insight would be GREATLY appreciated.

       

      -J