<br>   Barry,<br><br>   I did not run the code bellow, but drools uses the temporal distance algorithm to calculate how much time it has to wait on a &quot;delaying not&quot; before activating the rule. So, the first question I have is what are you using as timestamp for the events? the time they are inserted into the engine or a timestamp attribute? <br>
<br>   []s<br>   Edson<br><br>   <br><br><div class="gmail_quote">2009/8/30 Barry Kaplan <span dir="ltr">&lt;<a href="mailto:groups1@memelet.com">groups1@memelet.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
After looking at ../integrationtests/test_CEP_DelayingNot.drl I&#39;m getting<br>
closer, but not really understanding. I can get a greenbar with the below.<br>
However if change the last advanceTime() value to anything less than 30 the<br>
test fails. So it seems that the the conditional not clause does not start<br>
its window until the first two clauses are true.<br>
<br>
Why would this be? Why does it not start ticking when the first StartEvent<br>
is inserted?<br>
<br>
----<br>
rule &quot;[every s-&gt;f&amp;&amp;!a] How do I use patterns to correlate events arriving<br>
in-order or out-of-order?&quot;<br>
when<br>
        $se : StartEvent($exchangeId : exchangeId)<br>
                from entry-point &quot;stream&quot;<br>
<br>
        $fe : FinishedEvent(exchangeId == $exchangeId, this after[0s,30s] $se)<br>
                from entry-point &quot;stream&quot;<br>
<br>
        not (AbortedEvent(exchangeId == $exchangeId, this after[0s,30s] $se)<br>
                from entry-point &quot;stream&quot;)<br>
then<br>
        results.put(&quot;startEvent&quot;, $se);<br>
        results.put(&quot;finishedEvent&quot;, $fe);<br>
end<br>
----<br>
        @Test<br>
        def void<br>
How_do_I_use_patterns_to_correlate_events_arriving_in_order_or_out_of_order__B()<br>
{<br>
                insert new StartEvent(id: &quot;se1&quot;, exchangeId: &quot;BBB&quot;)<br>
                advanceTime 10, SECONDS<br>
                fireAllRules()<br>
                assert results.isEmpty()<br>
<br>
                advanceTime 10, SECONDS<br>
                insert new FinishedEvent(id: &quot;fe1&quot;, exchangeId: &quot;BBB&quot;)<br>
                fireAllRules()<br>
                assert results.isEmpty()<br>
<br>
                advanceTime 30, SECONDS<br>
                assert results[&quot;startEvent&quot;].id == &quot;se1&quot;<br>
                assert results[&quot;finishedEvent&quot;].id == &quot;fe1&quot;<br>
        }<br>
----<br>
<font color="#888888">--<br>
View this message in context: <a href="http://www.nabble.com/Conditional-%27not%27-invalid-for-event-streams--tp25217095p25217673.html" target="_blank">http://www.nabble.com/Conditional-%27not%27-invalid-for-event-streams--tp25217095p25217673.html</a><br>

</font><div><div></div><div class="h5">Sent from the drools - user mailing list archive at Nabble.com.<br>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>  Edson Tirelli<br>  JBoss Drools Core Development<br>  JBoss by Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>