[jboss-user] [jBPM] - Re: saving state after workitem

Chris Melas do-not-reply at jboss.com
Wed Jan 18 08:36:03 EST 2012

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

"Re: saving state after workitem"

To view the discussion, visit: https://community.jboss.org/message/647369#647369

What if the server crashes while calling the web service just before calling it or just before the response is received?
To overcome such a scenario, you would need to persist the work item before calling the web service.

Generally when you create a workitem, in order to have its state persisted, by the engine, you need to run it asynchronously, i.e. within a new thread.
When the system is recovered you would need to re run this work item.

If you want to perist the state of the process right after the web service is called, in other words when the work item is completed, you can simply call another asynchronous work item right after the call of you web service work item. In addition a human task could be used, if it makes sense.

However, what if the system goes down before completing the ws work item but after the ws call?
Then you need to apply some kind of logic in your system that runs the ws call within a transaction and modifies some kind of state, that you will check when trying to rerun the work item after a process recovery.

Reply to this message by going to Community

Start a new discussion in jBPM at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120118/7651d1d1/attachment.html 

More information about the jboss-user mailing list