[rules-users] Question about timing rules

Edson Tirelli tirelli at post.com
Thu Jun 5 13:02:48 EDT 2008


   Allen,

   For Drools 4, the way to go is following the suggestions given by the
other list members. Drools 4 has no concept of clock itself, so you need to
handle time as a fact.
   Drools 5 brings a whole new framework to deal with time, where you have
the concept of a session clock that can be used to constraint facts, etc.
But Drools 5 is still in development.

   []s
   Edson

2008/6/5 Bagwell, Allen F <afbagwe at sandia.gov>:

>
> Another noob question:
>
> Is there a generally understood way of implementing the concept of a time
> interval rule?
>
> That is, lets say I have a Drools-enabled client which is constantly
> receiving information from outside resources. Most of this data (and the
> consequences of its changes) is time sensitive, so I'm calling the
> fireAllRules() method in a loop every minute.
>
> And now, let's say I have a rule that in addition to being driven by
> incoming data changes has to be linked to a repeating clock interval or
> synched with wall time such that the rule only activates and fires if the
> data meets certain parameters AND it's been exactly 1 hour since the last
> check or that it will fire at the top of every wall time hour (1 PM, 2PM, 3
> PM, etc.).
>
> Furthermore, timing may change. A successful rule activation and firing
> might do something like "now change this timing so that for the next 24
> hours, this rule must be examined every 30 minutes instead of every hour".
>
> My initial reading of the Drools documetation I came across the Duration,
> and Date-* keywords. Their descriptions didn't seem to fit the bill.
>
> I ask this because our old rules engine software that has been retired to
> obsolescence allowed this kind of thing to be easily set up. Coming at it in
> the Drools world seems a lot more challenging.
>
> Thoughts? Examples?
>
> -Allen
>
>
>
>
>
> _______________________________________________
> 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/20080605/b84b7167/attachment.html 


More information about the rules-users mailing list