JBoss Community

Re: Using Timers to Interrupt Synchronous Process in jBPM5

created by Maciej Swiderski in jBPM - View the full discussion

Hi,

 

issue you are facing is due to thread synchronization. You start a process on a thread that does not complete when timer is fired. Timer is executed on separate thread but it cannot continue because it waits until the first operation will release process instance which does not happen so the sleeping time expires in your work item handler and timer does not have opportunity to complete.

 

Please find attached modified work item handler that moves the work to be done on separate thread and releases the main thread that started the process. With this timer is fired properly and activity is aborted.

 

HTH

Reply to this message by going to Community

Start a new discussion in jBPM at Community