[rules-users] Custom dates with @date-effective and @date-expires

Faisal Shafique just_faisal at yahoo.com
Thu Mar 17 09:32:30 EDT 2011


Thanks for the answer. Yes, it may be easier to achieve with simple date fact but we have thousands of rules and each and every one of them has this temporal requirement. I was thinking along the lines of SessionClock. I know there is a 'realtime' and 'pseudoclock' implementation of it. May be I can write my own implementation of SessionClock and set any arbitrary date passed by the user into the knowledge session config. Then the rules attributes (@date-effective and @date-expires) can take care of filtering out the ones not effective on the date that I am setting in SessionClock. Am I thinking in the wrong direction?

Regards,

Faisal Shafique

On Mar 17, 2011, at 12:34 AM, Wolfgang Laun <wolfgang.laun at gmail.com> wrote:

> The desired effect might be easier to achieve with a fact EffectiveDate { Date date; } and a pattern specifying the limits. 
> 
> The rule attributes (not metadata) are based on the system data, and you wouldn't want to mess with it just to use data-effective and date-expires.
> 
> -W
> 
> On 17 March 2011 00:33, Faisal Shafique <just_faisal at yahoo.com> wrote:
> Hi,
> 
> Can I use any arbitrary date for the drools execution so that correct rules are fired based on not current date but any arbitrary date? This is in the context of @date-effective and @date-expires metadata that can be specified as part of a rule. Drools expert documentation seems to imply that this metadata uses "current date" though I am not clear what current date (system date?) means.
> 
> Thanks
> 
> Faisal Shafique
> 
> 
> 
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
> 
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110317/0cc46034/attachment.html 


More information about the rules-users mailing list