JBoss Community

Re: Change a Timer length/period at runtime possible?

created by Ryan Peterson in jBPM - View the full discussion

A bit more advice from krisv and I was able to get this to work:

 

After migrating to the new process, I cancel the old timer, then once the node ids are re-mapped (same as happens in the WorkflowProcessInstanceUpgrader), and the processInstance is reconnected, I call the "to" trigger for the original node (I keep a reference to the active timer when mapping the node ids from the old process to the new):

 

originalTimerNodeInstance.trigger(null, instance.getTimerNode().getTo().getToType());

 

This "clears" the original process timer, and allows execution to continue in the newly defined nodes in the new process.

 

Thanks again krisv for your help!

Reply to this message by going to Community

Start a new discussion in jBPM at Community