-
1. Re: Resume BPM process after server restart
dward Dec 20, 2012 5:51 PM (in response to calvinchu101)Calvin. Thanks for bringing this to our attention. We've been a bit "heads-down" working on 0.7, but I should be able to look at this tomorrow. Thanks again!
-
2. Re: Resume BPM process after server restart
dward Dec 21, 2012 5:07 PM (in response to dward)1 of 1 people found this helpfulCalvin, to re-associate with a previously persisted session, you will have to somehow pass in the sessionId the stateful session was originally persisted with.
In 0.6, the sessionId should be populated in the response header per the variable: {urn:switchyard-component-bpm:process:1.0}sessionId. If using the soap binding, this will show up in the soap headers section of the response. (In 0.7, it will be {urn:switchyard-component-bpm:bpm:1.0}sessionId.)
In subsequent requests, you should pass in this same sessionId to make sure you are using the same persisted session. If using the soap binding, this would go in the soap headers section of the request.
There is also a sessionId attribute on the <implementation.bpm> component configuration, but this is of limited use, obviously, as that would be a static definition for a dynamic variable.
Let me know if this works for you. If not, I will have to dig in deeper. Just so you're aware, however, all of Red Hat (except for our paid-support crew, of course) is on vacation next week, so I might not be able to respond right away.
Happy holidays!
David
-
3. Re: Resume BPM process after server restart
dward Jan 2, 2013 8:30 AM (in response to dward)(Also don't forget to pass in processInstanceId in addition to sessionId.)
-
4. Re: Resume BPM process after server restart
calvinchu101 Jan 3, 2013 2:25 PM (in response to dward)Hi David,
With {urn:switchyard-component-bpm:process:1.0}sessionId in the message header, I am able to resume the process after restart by JMS signal. Thanks!
But I am not able to do the same thing in Human Task, I use <bpm:taskHandler name="Human Task" class="org.switchyard.component.bpm.task.work.jbpm.JBPMHumanTaskHandler" /> in my bpm component configuration and I didn't find the method to set the previous sessionId. I also tried to set sessionId="1" in bpm:implementation.bpm such that the sessionId is fixed after restart. But it still not able to resume the processes upon Human Task completion. Can you please advice how to resume bpm process which pending on Human Task before the restart ?
Thank you very much !
-
5. Re: Resume BPM process after server restart
dward Jan 4, 2013 10:59 AM (in response to calvinchu101)Calvin, we've started going through testing of 0.7.0.Final today. I will include this in my list of manual things to test, and get back to you. Hopefully it won't take too long.
-
6. Re: Resume BPM process after server restart
calvinchu101 Jan 22, 2013 9:47 AM (in response to dward)Hi David,
May I know if there are any update on resuming the process from Human Task ?
Also, with more testing, I found that if I specify sessionId="1" in bpm:implementation.bpm, it will raise exception and fail to create jBPM session (Session ID 1 not found!) when the SESSIONINFO table is empty. However, this scenario do exists during 1st time deployment. As it is not supposed to create the SESSIONINFO entry manually, is there any way SwitchYard could create the session if the specified session Id does not exists ? Thanks again!
-
7. Re: Resume BPM process after server restart
calvinchu101 Jan 24, 2013 4:32 PM (in response to calvinchu101)The human task issue is related to the JIRA case of jBPM https://issues.jboss.org/browse/JBPM-3673, as the MinaHTWorkItemHandler do not connect task server until the 1st request is received.
After restart, if a new process is started and creates a human task first. The previous processes before the restart would be resumed after the corresponding human tasks was completed.
With SY 0.7, as native WorkItemHandler from jBPM is allowed, it is much easier now to override the MinaHTWorkItemHandler and connect the task server upon initialization.
And I think SY should address the "Session ID not found" issue if sessionId is specified while deployed with an empty SESSIONINFO table (during 1st deployment).
-
8. Re: Resume BPM process after server restart
dward Jan 24, 2013 5:29 PM (in response to calvinchu101)Hi Calvin, thanks for your continued effort on this, and I apologize in my delayed response. I just finished up a chunk of other work I needed to get done, so I'll be getting back to this. Sorry for the delay! If a JIRA ends up being created from this, I will link it to this forum thread so you can follow it.