<div><br></div>   Hi Jaro,<div><br></div><div>   This might be a side effect of the temporal reasoning algorithm when using unbounded intervals like you are doing (i.e., using before and after operators without an interval parameter). Assuming this is what is happening, the activation is probably scheduled, but it only happens when the next activity is about to happen inside the session.</div>
<div><br></div><div>   With the current version, I can only suggest two workarounds. Either:</div><div><br></div><div>* Use straight relational operators in your rule (&gt;, &lt;). E.g.:</div><div><br></div><div>        $ev2 : LocalizationEvent( ..., timestamp &gt; $ev1.timestamp ) ...<br>
<br>* Or, try to use bounded temporal operators. E.g.:</div><div><br></div><div>        $ev2 : LocalizationEvent( ... this after[0,60s] $ev1 ) ...</div><div><br></div><div>    We know it is not ideal, and for the next Drools release we are implementing explicit sequence operators where you will be able to just define [strict] sequencing. E.g.:</div>
<div><br></div><div>when</div><div> $ev1 : LocalizationEvent( ... ) =&gt;</div><div> $ev2 : LocalizationEvent( ... )<br>then</div><div>...</div><div><br></div><div>     Details here:</div><div><br></div><div><a href="https://community.jboss.org/wiki/EventSequencing#4_Definition_Sequence_Conditional_Elements">https://community.jboss.org/wiki/EventSequencing#4_Definition_Sequence_Conditional_Elements</a></div>
<div><br></div><div>     Edson<br><div class="gmail_quote">On Wed, Aug 1, 2012 at 5:52 AM, jpullmann <span dir="ltr">&lt;<a href="mailto:jaroslav.pullmann@fit.fraunhofer.de" target="_blank">jaroslav.pullmann@fit.fraunhofer.de</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear contributors,<br>
<br>
  this rule is expected to match a sequence of 2 consecutive events:<br>
<br>
rule &quot;test&quot;<br>
    when<br>
        // a)<br>
        $ev1 : LocalizationEvent( type == TYPE.HINT,  $target : target  )<br>
from entry-point &quot;events/localization&quot;<br>
        $ev2 : LocalizationEvent( type == TYPE.HINT, target == $target, this<br>
after $ev1 ) from entry-point &quot;events/localization&quot;<br>
        // b)<br>
        // Ev1 directly followed by ev2: no other HINT in between<br>
        not( LocalizationEvent( type == TYPE.HINT, target == $target, this<br>
after $ev1, this before $ev2 )  from entry-point &quot;events/localization&quot; )<br>
    then<br>
      do()<br>
end<br>
<br>
 The second event is interpreted as a &quot;confirmation&quot; of the first event (a).<br>
 No other (deviating) event is allowed between them (b). With this<br>
restriction<br>
 in place, the rule requires a sequence of 3 input events for activation,<br>
otherwise<br>
 2 events are sufficient (as expected). The events are ordered correctly and<br>
it is<br>
 not obvious, why a third event is needed since the interval between ev1 and<br>
ev2 is<br>
 closed ? This leads to an unnecessary delay in rule activation.. How could<br>
this be<br>
 avoided and are there other approaches to match a concrete event sequence<br>
pattern ?<br>
<br>
 Many thanks<br>
   Jaro<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Matching-consecutive-events-tp4018980.html" target="_blank">http://drools.46999.n3.nabble.com/Matching-consecutive-events-tp4018980.html</a><br>
Sent from the Drools: User forum mailing list archive at Nabble.com.<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>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>  Edson Tirelli<br>  JBoss Drools Core Development<br>  JBoss by Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>
</div>