[jboss-user] [jBPM] - Re: Using a Timer

Gary tse do-not-reply at jboss.com
Fri Sep 2 02:21:01 EDT 2011

Gary tse [http://community.jboss.org/people/garytse] created the discussion

"Re: Using a Timer"

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

I would like to use a timer in my graph where after a given period of time the next node will be a service task call to do some work and complete the business process instance. 
* That can easily be done.  The tricky part is that the current designer UI does not allow you to attach a timer event to an "Embedded Sub-Process" so you have to manually edit the XML for that.

 Is it true in order for the timer to work I need to reload the business process instance in memory and then call fireAllRules() on the statefulknowledgesession?  
* No need.  The StatefulKnowledgeSession itself has a "timer thread" that kicks in when your schedule is due.

I would highly recommend you to take a look at the examples.  jbpm-examples/src/main/resources/junit/BPMN2-TimerBoundaryEventCycle1.bpm2  is exactly the kind of thing you want.

Good luck !

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/20110902/27e06d0e/attachment.html 

More information about the jboss-user mailing list