[rules-users] Define a time event
Tomas Olsson
tol at sics.se
Wed May 7 10:12:25 EDT 2008
You can for instance use http://www.opensymphony.com/quartz/ to schedule
the execution of events.
/Tomas
Edson Tirelli wrote:
>
> 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
> <mailto: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 <mailto: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 <http://www.jboss.com>
> ------------------------------------------------------------------------
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
More information about the rules-users
mailing list