[rules-users] Getting Current Date in LHS of a rule

sumatheja sumatheja at gmail.com
Wed May 9 06:26:30 EDT 2012


Hi All,
        Can anyone tell me if there is a variable or standard way to get
the *current date* and compare with the java.util.Date. I'm trying write
the below rule but it doesn't work. It doesn't throw any error but the rule
is not at all fired in any case

rule "new rule"
dialect "java"
when
    Message(*testDate < new Date()*)
then
    System.out.println("Test");
end
Do I have to insert a seperate fact which will contain the current date?
Thanks in advance.

-- 
cheers
Sumatheja Dasararaju
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20120509/a9926332/attachment-0001.html 


More information about the rules-users mailing list