[jboss-user] [jBPM] - jBPM5 timers and persistence

Vlastimil Menčík do-not-reply at jboss.com
Tue Apr 5 11:12:42 EDT 2011


Vlastimil Menčík [http://community.jboss.org/people/st_patriick] created the discussion

"jBPM5 timers and persistence"

To view the discussion, visit: http://community.jboss.org/message/597936#597936

--------------------------------------------------------------
The timers in the current implementation (jBPM 5.0.0) cannot outlive the knowledge session they were started in. Correct me if I'm wrong, but this is because the TimerService, that is used to schedule timer events, is bound to the knowledge session and is destroyed when the session is disposed.

This makes the timers IMHO basically incompatible with process persistence.

Trivial example is a process with a delay timer (from Esteban's JBPM-Samples):
 http://community.jboss.org/servlet/JiveServlet/showImage/2-597936-16097/delayTimer.PNG  http://community.jboss.org/servlet/JiveServlet/downloadImage/2-597936-16097/450-51/delayTimer.PNG 
1. Knowledge session is created.
2. The process is started, waits on the timer and its state is persisted.
3. The session is immediately disposed (before the timer event was triggered).

In this case, the timer is never triggered and the process stays in the waiting state forever.

A more practical example would be time-based escalations in long-lived processes. See Esteban's example:   http://community.jboss.org/message/595104#595104 http://community.jboss.org/message/595104#595104.

Imagine a process where a task must be completed within a week, if not, an escalation is triggered. Naturally we would use process persistence in this scenario. The problem is that the knowledge sessions are short-lived (relatively to the process) and are disposed immediately after process instances are started. Certainly before the escalation timer would expire.

Is there a way how to combine timers with persistence at this time? And if not, are there plans to support this scenario in some future release?
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/597936#597936]

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/20110405/952ef257/attachment.html 


More information about the jboss-user mailing list