This content has been marked as final.
Show 4 replies
-
1. Re: Persisting ProcessInstance at arbitrary state
koen.aers Oct 15, 2005 4:46 AM (in response to brianmb99)Brian,
The ProcessInstance *is* persisted in the "DoStuff" state. The state is the situation in which the process instance is waiting for the next thing to happen.
Regards,
Koen -
2. Re: Persisting ProcessInstance at arbitrary state
brianmb99 Oct 15, 2005 7:50 PM (in response to brianmb99)Thanks, Koen.
So if I understand correctly, it would not be appropriate to dopublic class MyActionHandler implements ActionHandler { public void execute(ExecutionContext executionContext) throws Exception { saveProcessInstanceToDB(); String result = someLongRunningPotentiallyUnstableProcess(); executionContext.getToken.signal(result); } }
but instead one should dopublic class MyActionHandler implements ActionHandler { public void execute(ExecutionContext executionContext) throws Exception { long tokenId = executionContext.getToken().getId(); sendAsyncMessageToStartALongRunningProcess(tokenId); } } public class MyMessageConsumer { public void consumeMessage(tokenId) { String result = someLongRunningProcess(); jbpmSession.beginTransaction(); Token myToken = jbpmSession.getGraphSession.loadToken(tokenId); myToken.signal(result); jbpmSession.commitTransactionAndClose(); } }
or something along those lines?
Thanks much for your help with my perhaps elementary question.
Brian. -
3. Re: Persisting ProcessInstance at arbitrary state
kukeltje Oct 15, 2005 8:15 PM (in response to brianmb99)Yep... and you know what.... look at the latest code in cvs. Work is comming along nice on this part. Maybe you can try it out and find bugs in it.
Ronald -
4. Re: Persisting ProcessInstance at arbitrary state
brianmb99 Oct 15, 2005 8:29 PM (in response to brianmb99)Great, thanks. I'm putting together a report on jBPM for my dev team - it looks promising. If we decide to go with jBPM you'll be hearing a lot more from me and I'll try to help out where I can - reporting bugs or whatever!
Thanks for your hard work on this promising project and for the prompt replies in the forum.
Brian