<br>&nbsp;&nbsp; Exactly. Also, you need to make sure you &quot;tell the engine&quot; everytime your Time object change, as well as ensure that fireAllRules will be called at the exact time: 22:00, because if it is called 1 minute later or before, the constraint will evaluate to false.<br>
<br>&nbsp;&nbsp; Edson<br><br><br><div class="gmail_quote">2008/5/7 Christine &lt;<a href="mailto:christine@christine.nl">christine@christine.nl</a>&gt;:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
&gt; Hi everyone,<br>
<div class="Ih2E3d"><br>
&gt; For example:<br>
&gt; &nbsp;when Time(hour==22,minute==0) &nbsp; Lamp(status==1)<br>
&gt; then<br>
&gt; Console.Writeline(&quot;It&#39;s late,turn off the light and go to bed&quot;)<br>
&gt; where time is a class that return the current hour;<br>
<br>
</div>Claudio, this would probably work if you fire the rules every hour or<br>
every minute or every time your Time object changes. Just having the rules<br>
sitting in your rulebase doesn&#39;t mean they get executed.<br>
<br>
Christine<br>
<br>
<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><br clear="all"><br>-- <br> Edson Tirelli<br> JBoss Drools Core Development<br> Office: +55 11 3529-6000<br> Mobile: +55 11 9287-5646<br> JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a>