<br> Exactly. Also, you need to make sure you "tell the engine" 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> Edson<br><br><br><div class="gmail_quote">2008/5/7 Christine <<a href="mailto:christine@christine.nl">christine@christine.nl</a>>:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
> Hi everyone,<br>
<div class="Ih2E3d"><br>
> For example:<br>
> when Time(hour==22,minute==0) Lamp(status==1)<br>
> then<br>
> Console.Writeline("It's late,turn off the light and go to bed")<br>
> 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'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>