I think something like this should work:<div><br></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">rule &quot;raise alarm&quot;<br>when<br>  Event($type : eventType)<br>

  exists (ArrayList (size &gt; 10)<br>            from collect (Event(eventType == $type)))<br>then<br>  raise alarm</span></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><br>

</span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">Of course that you can&#39;t use the $events anymore. You can use a flag too:</span></font></div>

<div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><br></span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><span class="Apple-style-span" style="font-size: 13px; ">rule &quot;raise alarm&quot;<br>

when</span></span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><span class="Apple-style-span" style="font-size: 13px; ">  not TheAlarmWasAlreadyTriggered()<br>

  Event($type : eventType)<br>  $events: ArrayList (size &gt; 10)<br>            from collect (Event(eventType == $type))<br>then<br>  raise alarm</span></span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">  insert(new <span class="Apple-style-span" style="font-size: 13px; ">TheAlarmWasAlreadyTriggered());</span></span></font></div>

<div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><br></span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">best,<br>

</span></font><br><div class="gmail_quote">2010/3/15 Amit Kumar <span dir="ltr">&lt;<a href="mailto:amitkumar@gmail.com">amitkumar@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Hello All,<br><br>Was doing some rule writing and am seeing some issues which I want to overcome.<br><br>In Fusion when we send the facts into working memory.. there seems to be no way that rules are automatically getting triggered.<br>



We have to call fireAllRules after each fact insertion. Is this the way it was designed. Its like this in the stocktick example also<br><br>This one should be simple for somebody with little more experience than me<br>In the following rule<br>



<br>rule &quot;raise alarm&quot;<br>when<br>  Event($type : eventType)<br>  $events: ArrayList (size &gt; 10)<br>            from collect (Event(eventType == $type))<br>then<br>  raise alarm<br><br>In the above rule the raise alarm is getting called 10 times. .. How can I make it to be called only once.<br>



<br>Thanks<br><font color="#888888">Amit<br>
</font><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>
<br></blockquote></div><br><br clear="all"><br>-- <br>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br><br>Esteban Aliverti<br>
</div>