JBoss Community

Change a Timer length/period at runtime possible?

created by Ryan Peterson in jBPM - View the full discussion

Hi guys,

 

I'm working on allowing updating of processes.  I've got things mostly working thanks to the examples given by the documentation.  Here's an example of my test:

 

Old Process:

http://community.jboss.org/servlet/JiveServlet/downloadImage/2-633576-17226/450-238/oldProcess.png

 

New Process:

http://community.jboss.org/servlet/JiveServlet/downloadImage/2-633576-17227/450-178/newProcess.png

As you can tell, the new process simply adds an additional email where only the timer existed before.  I disconnect the processInstance, update the node instance IDs, and set the new process definition onto the old processInstance.  

 

The new email gets sent, and execution continues to the new timer and eventually to the end state node.  The only trouble I'm having is the time defined for the original timer must elapse before execution continues to the next newly defined node.  Is it possible to change this timer's duration during the processInstance disconnect() (while I'm re-assigning the nodeInstance Ids)? 

 

If not, is there a way to tell the engine to skip over the previous NodeInstance rather than continuing to fire it?

 

Thanks for any suggestions!

Reply to this message by going to Community

Start a new discussion in jBPM at Community