dme [
http://community.jboss.org/people/dme] created the discussion
"Using Timers to Interrupt Synchronous Process in jBPM5"
To view the discussion, visit:
http://community.jboss.org/message/633745#633745
--------------------------------------------------------------
Hi,
How can I use an event timer to interrupt a synchronous process in jBPM5? I have created a
process which has a subprocess that performs a task (say MyCustomTask). I have a boundary
event timer set to 500ms. I observe the following behaviour:
1. If in MyCustomTask if I do not call "completeWorkItem", the event timer fires
correctly after 500ms
2. If in MyCustomTask if I make a call to "completeWorkItem" as the only thing
the task does, the event timer does not fire which is as expected, as the sub-process has
completed before the timer got a chance to fire
3. If in MyCustomTask if I sleep for 1sec (1000ms) and then make call
"completeWorkItem", the event timer does not fire. How can I get the timer to
fire in this case?
It seems that the timer is using the same thread as the MyCustomTask and for synchronous
task it will not fire? How can I make the timer to fire when if a sub-process does not
complete within "x" seconds?
Attached is the process file and Java (Handler and Driver) code for my test.
Thanks.
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/633745#633745]
Start a new discussion in jBPM at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]