[jboss-user] [jBPM] - Re: JEE + jBPM + threads

Maciej Swiderski do-not-reply at jboss.com
Thu May 23 03:46:23 EDT 2013

Maciej Swiderski [https://community.jboss.org/people/swiderski.maciej] created the discussion

"Re: JEE + jBPM + threads"

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

First of all process instances are not kept in memory if they are not actually executed. Meaning when process instance is in wait state (e.g. human task, timer, etc) process instance will be removed from the ksession and stored only in db. Whenever it's needed it will be loaded and executed - for example when timer fires it will load the process instance and execute it.
Although in jbpm 5.x timers are managed on session level so they will be fired as long as session is active. If you dispose session then timer will not fire at the right time but when you load the session all overdue timers will be fired then.
Moreover each session will have a dedicated ThreadPool for timers with single thread in it by default.

Looking at what you have implemented (ejb timers) I don't see a point of having timers in the process if you are not using them. Since you manage timer on your own you could use only signal events instead, so when ejb timer fires you send signal to process instance to continue processing. 

With version 6 it will be possible to have more advanced timers and session management where you could externalize timer management for example to quartz (out of the box support).


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/20130523/fac07711/attachment-0001.html 

More information about the jboss-user mailing list