[rules-users] Re: Date problem

Edson Tirelli tirelli at post.com
Thu Jan 24 12:53:24 EST 2008


   This is a bug. Can you please open a JIRA for it?

    The bug happens when you have an access path in the left side comparing
to the Date as string in the right.

m:Message( first.second.date > "01-jan-2007" ) // does not work
m:Message( date > "01-jan-2007" ) // works fine

    Need to fix the Drools->MVEL translation of the expression.

    Thanks,
      Edson

2008/1/24, jack wu <jackxwu at yahoo.com>:
>
> i copy the following from the Documentation. i thought it means that
> drools is going to auto convert the string "27-Oct-2007" into a java Date
> object.
>
> +++++++++
> DateThe date format "dd-mmm-yyyy" is supported by default. You can
> customize this by providing an alternative date format mask as a System
> property ("drools.dateformat" is the name of the property). If more
> control is required, use the inline-eval constraint.
> *Example 6.20. Date Literal Restriction*
>
> Cheese( bestBefore < "27-Oct-2007" )
> +++++++++++++++++++++++++
>
>
>
>
> Newsgroups: gmane.comp.java.drools.user<http://news.gmane.org/gmane.comp.java.drools.user>
> Date: 2008-01-23 23:32:42 GMT (4 hours and 13 minutes ago)
>  Were you compairing Date agaist string here, as your double quotes
> indicate?
>
> Xiandong
>
> Sent from my iPhone
>
> On Jan 23, 2008, at 17:33, jack wu <jackxwu <at> yahoo.com<jackxwu%20%3Cat%3E%20yahoo.com>>
> wrote:
>
>  if i have several levels of java beans, the Date is not working. example:
>
>         m:Message( first.second.date > "01-jan-2007" )
>
> ------------------------------
> Never miss a thing. Make Yahoo your homepage.<http://us.rd.yahoo.com/evt=51438/*http://www.yahoo.com/r/hs>
>
>
> _______________________________________________
> 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/20080124/4a9952a3/attachment.html 


More information about the rules-users mailing list