Hi guys, I am trying to implement multiple timers in a single ruleflow. I am trying to achieve: 1. Multiple timers running at the same time. 2. Multiple timers running consecutively.
It seems to me that the current implementation will not allow for this kind of behavior out of the box. ksession.fireAllRules() and ksession.halt() are very wide spread (as they act on the session and apply to “AllRules”) and don’t leave room to indicate what timer you want to start and which one to stop. This might work OK if you have only one timer, but if you have more than one: ksession.halt(); will stop all timers. And this is no good if you want to stop only a “specific” one and have others keep running. ksession.fireAllRules() will start all timers including timers you already stopped. E.g. a flow with 2 timers, you want to run first timer to send an email periodically while your flow is suspended on Human Task. Once the flow is resumed you’ll want run a second timer, down further on the flow, which waits in a second Human Task node. This works OK to the point where you do kesession.fireAllRules() to start the second timer and get the first timer running again as a bonus :) Has anybody implemented multiple timers? Any idea how to approach this? I appreciate any comments, Thanks, Nick. -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Multiple-timers-in-a-single-ruleflow-tp744541p744541.html Sent from the Drools - User mailing list archive at Nabble.com. _______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users