Guided Rule throws "Unable to Analyse Expression" error with Date field if used with OR and temporal operator (before)

Solution Verified - Updated -


  • If a user tries to create a rule using Guided Rule editor in Business Central, where the condition section includes a Temporal Operator like (before) with an OR (||) condition on a fact field of type java.util.Date it throws them Unable to Analyse Expression exception during validation of the rule .
    Here is a sample rule for reference.
EnrolmentInformation( enrolledDate != null || enrolledDate before "29-Apr-2017" )

That is causing them following error while validating the rule and even causes trouble while building the project too.

17:42:47,403 ERROR [org.drools.compiler.kie.builder.impl.AbstractKieModule] (http- Unable to build KieBaseModel:defaultKieBase
Unable to Analyse Expression enrolledDate != null || enrolledDate before new java.util.Date(1493404200000):
[Error: unknown class or illegal statement: org.mvel2.ParserContext@22a9f74]
[Near :
{... enrolledDate before new java.util.Date(1493404200 ....}

[Line: 9, Column: 2] : [Rule name='DateEvaluateRule']

How to fix this issue?


  • Red Hat JBoss BRMS (BRMS)
    • 6.4.x

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