<br><br><div class="gmail_quote">On 29 March 2011 19:04, marc <span dir="ltr">&lt;<a href="mailto:marc.strabin@gmail.com">marc.strabin@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Thanks,<br>
The JBRULES-2825 seems to be a similar issue indeed !<br>
<br>
The timer is necessary: When change the value of SimpleClock and I only do<br>
an update (obj), without calling fireAllRules(). That way the rule doesn&#39;t<br>
fire...  Is-it an other problem ??<br>
<br>
If I do a update + fireAllRulles() when I change the timer, the rule_b fire<br>
fine every 10 seconds. (without timer in the rule..)<br>
<br></blockquote><div>Sorry, but I do not understand what you mean by any of these two scenarios.<br>-W<br><br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<br>
<br>
I think there is an open JIRA for a very similar issue:<br>
<br>
JBRULES-2825 &amp;quot;rule with timer and CE not keeps firing after turning<br>
false&amp;quot;<br>
<br>
I have added these two rules as a comment.<br>
<br>
However, the timer isn&#39;t necessary in this here case. Since the SimpleClock<br>
fact is updated periodically, the engine will fire the rule as soon as<br>
dateInMillisec exceeds the clock value in the Message fact.<br>
<br>
Both rules work correctly, if written without the timer.<br>
<br>
Actuallay, the timer doesn&#39;t have any effect (except wasting a few cycles).<br>
If the LHS becomes true, it delays the first firing by 1s, and then the LHS<br>
is made false by changing the Message object. This stops the timer! But<br>
then, eventually, the LHS becomes true again, and *another timer *is<br>
started, delays 1s, fires, and terminates.<br>
<br>
-W<br>
<font color="#888888"><br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools-java-rules-engine.46999.n3.nabble.com/The-update-function-inside-a-rule-tp2747484p2749346.html" target="_blank">http://drools-java-rules-engine.46999.n3.nabble.com/The-update-function-inside-a-rule-tp2747484p2749346.html</a><br>

Sent from the Drools - User 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>
</font></blockquote></div><br>