[rules-users] Define a time event

Edson Tirelli tirelli at post.com
Wed May 7 09:30:30 EDT 2008


   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 at 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 at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20080507/e871d392/attachment.html 


More information about the rules-users mailing list