[jboss-user] [jBPM] - Re: JBPM5 running processess/tasks behaviour when App Server shutdown/restart

Chris Melas do-not-reply at jboss.com
Tue Jun 7 18:38:52 EDT 2011


Chris Melas [http://community.jboss.org/people/melc] created the discussion

"Re: JBPM5 running processess/tasks behaviour when App Server shutdown/restart"

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

--------------------------------------------------------------
Hello,
Well i've noticed that when running a custom work item that takes long and the system goes down, then when the system restarts the tasks are not resumed thus not finished.
What i do is since the custom work items are actually persisted in the database by the jbpm, when the system goes down before they've completed i've put some extra code to restart the work items present in the database as bootstrap code on the initialization of the system i.e.
for (Object resultObject : results) {
//where results are the rows from selecting the workitems from the database having name equal to my custom work items
                WorkItemInfo workItemInfo = (WorkItemInfo) resultObject;
                WorkItem workItem = workItemInfo.getWorkItem(ksession.getEnvironment());
                MyCustomWorkItemHandler myCustomWorkItemHandler = new MyCustomWorkItemHandler ();
                myCustomWorkItemHandler .executeWorkItem(workItem, ksession.getWorkItemManager());
            }
--------------------------------------------------------------

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

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/20110607/f984c2de/attachment.html 


More information about the jboss-user mailing list