[rules-users] Date comparison

Deshpande, Prasad Prasad.Deshpande at banctec.co.uk
Fri Nov 11 11:36:06 EST 2011


Hi,
As per documentation, I'm trying to use a simple rule for date comparison,

rule "EFP_14"
        when
            v:ResourceValue(QName == "A.datetime", value > "01-nov-2011")
        then
                System.out.println("--> Rule executed");
end

but I get following error while executing rule.

Not possible to compare a class java.util.Date with a class java.lang.String

It's actually default date format so should work, why is it complaining for class casting? Am I doing something wrong here?

________________________________

BancTec Limited.
Registered Office: Jarman House, Mathisen Way, Poyle Road, Colnbrook, Berkshire SL3 0HF. Incorporated in England & Wales : 1283512. VAT : GB 228 4783 38.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20111111/cd0a0825/attachment.html 


More information about the rules-users mailing list