[jboss-user] [jBPM] - Using Timers to Interrupt Synchronous Process in jBPM5
dme
do-not-reply at jboss.com
Wed Oct 26 18:07:31 EDT 2011
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&containerType=14&container=2034]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20111026/1c4efec6/attachment.html
More information about the jboss-user
mailing list