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.
Edson
2008/5/7 Christine <christine(a)christine.nl>:
> Hi everyone,
> For example:
> when Time(hour==22,minute==0) Lamp(status==1)
> then
> Console.Writeline("It's late,turn off the light and go to bed")
> where time is a class that return the current hour;
Claudio, this would probably work if you fire the rules every hour or
every minute or every time your Time object changes. Just having the rules
sitting in your rulebase doesn't mean they get executed.
Christine
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
Edson Tirelli
JBoss Drools Core Development
Office: +55 11 3529-6000
Mobile: +55 11 9287-5646
JBoss, a division of Red Hat @
www.jboss.com