[jboss-user] [jBPM] - Re: Process persistense - change WHEN it should happen!
nt2005
do-not-reply at jboss.com
Sat Jun 30 07:02:34 EDT 2012
nt2005 [https://community.jboss.org/people/nt2005] created the discussion
"Re: Process persistense - change WHEN it should happen!"
To view the discussion, visit: https://community.jboss.org/message/745208#745208
--------------------------------------------------------------
Hey again,
I want to manage persistence by my own. I am sure that I want this... ;)
I know how to persistence a StatefulKnowledgeSession and a ProcessInstance with marshaller. BUT after reloading a session and process I would like to go one with the process. But I have no idea how to combine a session und process again.
Example:
StatefulKnowledgeSession ksession = getKnowledgeBase().newStatefulKnowledgeSession();
registerWorkItems(ksession); // add Workitems to the session
ProcessInstance process = ksession.startProcess( "de.tud.iwm.catena.analysis.new" );
storeSession(ksession); // using marshaller
storeProcess(process); // using marshaller
// do anything else...
// and anywhen, anywhere - reload all
StatefulKnowledgeSession ksession = loadSession();
ProcessInstance process = loadProcess();
/*
And now I cannot use:
ksession.getWorkItemManager().completeWorkItem(....) Because the reloaded session does not know anything of the process
ksession.getProcessInstance(...) does not work - understandable
I was looking for somehting like:
ksession.addProcess(process)
*/
Thanks in advance. If it makes no sense to you what I really want and do, say it please. But it is hard for me to tell you it in english. O.o German would be a bit easier. ;)
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/745208#745208]
Start a new discussion in jBPM at Community
[https://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/20120630/0baf48af/attachment-0001.html
More information about the jboss-user
mailing list