Ryan Peterson [http://community.jboss.org/people/rrpeterson] created the 
discussion

"Re: How to resume a persisted processInstance?"

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

--------------------------------------------------------------
A partial answer I've found after playing with timers:

The time defined by the timer must pass within the method that invokes or 
retrieves the session in order to fire the next node.  

In other words, a string of nodes with a timer (for instance 15 seconds) all 
nodes will execute up to the timer and then will return, persisting the 
ksession.  If a Thread.sleep() for more than 15 seconds happens before calling 
session.dispose() in the original session.startProcess(), then the timer 
completes and the next nodes in the process instance will fire.

Also the same behavior happens retrieving the session via 
JPAKnowledgeService.loadStatefulKnowledgeSession, if a Thread.sleep() for a 
length over the timer value happens, then the timer expires and the next node 
is called.


Is there a way to setup a timer, for instance 2 hours, that when the ksession 
is retrived will check the time between the creation of the timer node, and 
current time?  Otherwise I don't see how timers would be useful, unless you're 
willing to dedicate a thread to each processInstance to sit & poll at fixed 
intervals to check if timers have expired?
--------------------------------------------------------------

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

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to