[rules-users] Initial rule delay

Paul R. reverselogic at gmail.com
Wed Jun 6 10:47:03 EDT 2012


Hi,

I'm looking for a way to delay a rules initial execution? In the following
example, I would like to prevent the rule from firing when the first "Foo"
event is inserted into the working memory.

rule "DelayTest" when $n : Number() from accumulate( $f : Foo() over
window:time(10s) count($f) ) then // bla end

The timer attribute seems to almost support what I'm looking for, i.e. it
allows for an initial-delay to be specified; but if the repeat interval is
omitted, it uses the initial delay as the repeat interval.

timer ( int: <initial delay> <repeat interval>? )

In my case I would like to block the execution of the rule for an
"initial-delay" period, but after that time has elapsed the rule should
fire when every time a new "Foo" event is inserted into the working memory.
What is the recommended way to do this?

Thanks & Regards,

Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20120606/14b753f6/attachment.html 


More information about the rules-users mailing list