The condition for &quot;some A and only the immediate successor of type B&quot; must be written as<br>$a: EventA()<br>$b: EventB( this after $a )<br>not EventB( this after $a, this before $b )<br><br>-W<br><br><div class="gmail_quote">
On 6 November 2012 01:58, michal.antolik <span dir="ltr">&lt;<a href="mailto:michal.antolik@siemens.com" target="_blank">michal.antolik@siemens.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
 I have a temporal pattern like<br>
<br>
*A after B*<br>
<br>
and a stream as<br>
<br>
*A1,B1,B2,B3,B4,B5,A2,B6*<br>
<br>
and if I define a pattern simply as<br>
$a: Event()<br>
$b: Event(this after $a)<br>
<br>
I&#39;ll get matches like (A1,B1),(A1,B2),(A1,B3),(A1,B4),...<br>
<br>
However I care about first match only and then I want to reset the pattern<br>
so the next one would be (A2,B6).<br>
<br>
Can you please advice how to achieve that? I don&#39;t want to do the<br>
deduplication by myself and most importantly I could achieve much better<br>
performance if I could expire partial matches (I cannot expire event since<br>
it might be used by other patterns)<br>
<br>
Thanks a lot for help.<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Rule-Match-deduplication-tp4020717.html" target="_blank">http://drools.46999.n3.nabble.com/Rule-Match-deduplication-tp4020717.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>