[jboss-user] [jBPM] - Re: How to persist a timer

Mare Geldenhuys do-not-reply at jboss.com
Thu Oct 6 07:37:32 EDT 2011


Mare Geldenhuys [http://community.jboss.org/people/mgeldenhuys] created the discussion

"Re: How to persist a timer"

To view the discussion, visit: http://community.jboss.org/message/630353#630353

--------------------------------------------------------------
Hi Stefan,

I was quite interested in your question, because we have to have long running processes as well. So I spent some time to try and see how this can be solved. I used your test case you uploaded to the JIRA to test and this is what I did:

When loading the KnowledgeSession you can pass in a reference to a KnowledgeBase.

StatefulKnowledgeSession ksession = JPAKnowledgeService.loadStatefulKnowledgeSession(sessionId, knowledgeBase, null, env);
 


That solves the problem of loading a knowledge session with an already loaded knowledge base.

You can write a knowledge base itself to external storage, the KnowledgeBaseImpl class is Externalizable, and then read it again from external storage to load up you session. 

This obviously does not solve the problem where the knowledgebase needs to be rebuilt because of changes to the process definitions, but at least you can load sessions now with existing process definitions. 

You can also look at using a knowledge agent to load knowledge bases from Guvnor which should manage changes to process definitions.

Mare
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/630353#630353]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20111006/c604ac9e/attachment.html 


More information about the jboss-user mailing list