<div style="text-align:left"><font face="arial, helvetica, sans-serif"><span style="line-height:16px;white-space:pre-wrap">Hi,</span></font></div><div style="text-align:left"><font face="arial, helvetica, sans-serif"><span style="line-height:16px;white-space:pre-wrap"><br>
I&#39;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 &quot;Foo&quot; event is inserted into the working memory.</span></font></div>
<div style="text-align:left"><font face="arial, helvetica, sans-serif"><span style="line-height:16px;white-space:pre-wrap"><br></span></font></div><div><span style="line-height:16px;text-align:left;font-size:15px;white-space:pre-wrap"><font face="Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace">rule &quot;DelayTest&quot;
when
    $n : Number() from accumulate(
        $f : Foo()
        over window:time(10s)
        count($f)
    )
then
    // bla
end</font></span><span style="line-height:16px;text-align:left;font-size:15px;white-space:pre-wrap;font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace">
</span></div><div><span style="line-height:16px;text-align:left;font-size:15px;white-space:pre-wrap"><font face="Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace"><br></font></span></div>
<div style="text-align:left"><font face="arial, helvetica, sans-serif"><span style="line-height:16px;white-space:pre-wrap">The timer attribute seems to almost support what I&#39;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.</span></font></div>
<div style="text-align:left"><font face="arial, helvetica, sans-serif"><span style="line-height:16px;white-space:pre-wrap"><br></span></font></div><div style="text-align:left"><span style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;font-size:15px;line-height:16px;white-space:pre-wrap">timer ( int: &lt;initial delay&gt; &lt;repeat interval&gt;? )</span></div>
<div style="text-align:left"><font face="arial, helvetica, sans-serif"><span style="line-height:16px;white-space:pre-wrap"><br></span></font></div><div style="text-align:left"><font face="arial, helvetica, sans-serif"><span style="line-height:16px;white-space:pre-wrap">In my case I would like to block the execution of the rule for an &quot;initial-delay&quot; period, but after that time has elapsed the rule should fire when every time a new &quot;Foo&quot; event is inserted into the working memory. What is the recommended way to do this?</span></font></div>
<div style="text-align:left"><font face="arial, helvetica, sans-serif"><span style="line-height:16px;white-space:pre-wrap"><br></span></font></div><div style="text-align:left"><font face="arial, helvetica, sans-serif"><span style="line-height:16px;white-space:pre-wrap">Thanks &amp; Regards,</span></font></div>
<div style="text-align:left"><font face="arial, helvetica, sans-serif"><span style="line-height:16px;white-space:pre-wrap"><br></span></font></div><div style="text-align:left"><font face="arial, helvetica, sans-serif"><span style="line-height:16px;white-space:pre-wrap">Paul</span></font></div>
<div style="text-align:left"><font face="arial, helvetica, sans-serif"><span style="line-height:16px;white-space:pre-wrap"><br></span></font></div><div><span style="line-height:16px;text-align:left;font-size:15px;white-space:pre-wrap"><font face="Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace"><br>
</font></span></div><div style="text-align:left"><font face="Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace"><span style="font-size:15px;line-height:16px;white-space:pre-wrap"><br>
</span></font></div><div><span style="line-height:16px;text-align:left;font-size:15px;white-space:pre-wrap;font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace"><br></span></div>
<div><span style="line-height:16px;text-align:left;font-size:15px;white-space:pre-wrap;font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace"><br></span></div><div><span style="line-height:16px;text-align:left;font-size:15px;white-space:pre-wrap;font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace"><br>

</span></div>