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

Stefan Krause do-not-reply at jboss.com
Tue Oct 4 13:11:09 EDT 2011


Stefan Krause [http://community.jboss.org/people/krausest] created the discussion

"Re: How to persist a timer"

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

--------------------------------------------------------------
Thanks for your help so far! I found that the problem occurs when I recreate the KnowledgeBase. If I keep the KnowledgeBase (e.g. in a member variable) I can recreate the session with JPAKnowledgeService.loadStatefulKnowledgeSession and everything is fine.

Here's how I create the KnowledgeBase:
{code}
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add(ResourceFactory.newClassPathResource("TimerPersistence.bpmn2"), ResourceType.BPMN2);
KnowledgeBase knowledgeBase = kbuilder.newKnowledgeBase();
{code}

How can I handle recreation of the KnowledgeBase e.g. in a web app when I run in a new java process?
--------------------------------------------------------------

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

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/20111004/71c56b8f/attachment-0001.html 


More information about the jboss-user mailing list