Drools editor in JBDS shows error message if rule include the keyword "today"

Solution Verified - Updated -

Issue

With Drools perspective, error message displays in the Problem window if user write a drl as follows:

rule "GoodBye"
    when
        Message( status == Message.GOODBYE, myMessage : message, today <= "2015/07/26" )
    then
        System.out.println( myMessage );
end

Error message:

Unable to Analyse Expression today <= "2015/07/26":
[Error: Comparison operation requires compatible types. Found class java.util.Date and class java.lang.String]
[Near : {... today <= "2015/07/26" ....}]
                ^

How to fix it

Environment

  • Red Hat JBoss BRMS
    • 6.1.0
  • JBoss Developer Studio
    • 8.1.0.GA
  • JBoss Developer Studio Integration Stuck
    • 8.0.2.GA

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content