<div dir="ltr"><br>&nbsp;&nbsp; The same interface you are using (AgendaEventListener) has 2 methods for activations created and canceled:<br><br>&nbsp;&nbsp;&nbsp; void activationCreated(ActivationCreatedEvent event,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WorkingMemory workingMemory);<br>
<br>&nbsp;&nbsp;&nbsp; void activationCancelled(ActivationCancelledEvent event,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WorkingMemory workingMemory);<br><br>&nbsp;&nbsp;&nbsp; []s<br>&nbsp;&nbsp;&nbsp; Edson<br><br><div class="gmail_quote">2008/7/29 Claudio Rainoldi <span dir="ltr">&lt;<a href="mailto:claudio.rainoldi@gmail.com">claudio.rainoldi@gmail.com</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;"><div>Hi everyone,</div>
<div>isn&#39;it there a way to find when a rule isn&#39;t more active.</div>
<div>For example if i have this rule:</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>rule &quot;light 2 on&quot;<br>dialect &quot;java&quot; <br>when<br>Light (name==&quot;0/0/2&quot;, actualvalue==&quot;1&quot;);<br>then<br>System.out.println(&quot;luce 2 on&quot;);<br>end</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>when someone turn on the light 2 i discover that the rule is fired using an Agenda Event Listener and the method&nbsp;<font size="2">afterActivationFired;</font></div>
<div><font size="2">But when someone turn off the ligth isn&#39;t there a similar&nbsp;way to discover that the rule &quot;light 2 on&quot; isn&#39;t more active.</font></div>
<div><font size="2">My only solution is to use the dual rule:</font></div>
<div>&nbsp;</div>
<div>rule &quot;light 2 on_dual&quot;<br>dialect &quot;java&quot; <br>when<br>not (Light (name==&quot;0/0/2&quot;, actualvalue==&quot;1&quot;));<br>then<br>System.out.println(&quot;luce 2 off&quot;);<br>end</div>
<div>&nbsp;</div>
<div>Isn&#39;t there a more sample way to do this?</div>
<div>Thanks in advance.</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>Cla</div>
<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> Edson Tirelli<br> JBoss Drools Core Development<br> JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>
</div>