<div dir="ltr">ok you are right.<br>But my problem now is: how can i know when a rule isn't more fired.<br>if this rule fired:<br><div><font size="2"><br>when mylamp=="on"</font></div>
<div><font size="2">then</font></div>
<div><font size="2">System.out.println("light 1 on");</font></div><br>How can i know when the light isn't more on?<br><br><div class="gmail_quote">2008/7/25 Marcus Ilgner <<a href="mailto:marcus.ilgner@gmail.com">marcus.ilgner@gmail.com</a>>:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">On Fri, Jul 25, 2008 at 1:04 PM, Claudio Rainoldi<br>
<<a href="mailto:claudio.rainoldi@gmail.com">claudio.rainoldi@gmail.com</a>> wrote:<br>
> Hi everyone,<br>
> i'm developing a java application using drools 4 for domotic control;<br>
> i ve implemented a listener on my working memory with the<br>
> method afterActivationFired(...) and activationCancelled(...) .<br>
> At startup of my app i've write the following lines:<br>
><br>
> listener = new FiredRulesListener();<br>
> workingMemory.addEventListener(listener);<br>
><br>
> Each time a rule is fired the method afterActivationFired(...) is called and<br>
> it is ok; but when the rule stop to be true the<br>
> method activationCancelled isn't never called.<br>
<br>
</div>Afaik, activationCancelled works like this:<br>
The fact is added, a rule would match, the activation is scheduled.<br>
However, another rule (probably with higher priority) matches, too,<br>
and it modifies the fact in a way that would make the first rule not<br>
match - thus, the activation is cancelled and the corresponding<br>
listener method gets called.<br>
<br>
Somebody correct me if I'm wrong, please ;)<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></div>