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&...]