An Event is either not counted yet, or already counted. If repeated counting is to be avoided during repeated insertion, store the &quot;counted&quot; property with the Event and write your rules accordingly.<br><br>-W<br>
<br><div class="gmail_quote">2011/9/9 Neel <span dir="ltr">&lt;<a href="mailto:neeleshdev@yahoo.co.in">neeleshdev@yahoo.co.in</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;">
<table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit;" valign="top">
Hi,<div>I&#39;m using Drools 5.3.0. I&#39;ve a proprietary key-value based data store, where all the events are stored. As soon as an event is received, it is inserted in the session and the rules (example below) is fired:</div>
<div><br></div><div><div>rule &quot;registration count&quot;</div><div>no-loop</div><div>dialect &quot;mvel&quot;</div><div>when</div><div><span style="white-space: pre-wrap;">        </span>$e : Event(type == &quot;registration&quot;, $s: student)</div>
<div>then</div><div><span style="white-space: pre-wrap;">        </span>$s.registerCount += 1;</div><div><span style="white-space: pre-wrap;">        </span>update($s);</div><div>end</div></div><div><br></div><div>All the &#39;registration&#39; events which has occurred in the past (stored in data store) also are inserted in session so that any rule with temporal operator (relates among the events) can
 work fine. If I insert previous events then the rule &quot;registration count&quot; is evaluated again for each previous events and fired. Please let me know, if there is a way to prevent rule evaluation for certain rules while event insertion. The events are too many, so I don&#39;t keep all in working memory for  long period, instead I store previous events in data store and insert all previous events also in session when I get a new event.</div>
<div>Please help me regarding the issue.</div><div><br></div><div>Thanks,</div><div>Neel</div><font color="#888888"><div><br></div><div><br></div></font></td></tr></tbody></table><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>