memberOf operator throws ClassCastException in rules written in BRMS platform

Solution Verified - Updated -

Issue

Given a Rule with the pattern:

SomeFact( group memberOf ( Arrays.asList("010,015".split(",")))

That pattern is used in decision tables where "010,015" is keyed in by users into a spreadsheet.
It worked until the release of BRMS 5.3.0, which throws the exception below:

java.lang.ClassCastException: Can't check if an attribute is member of an object of class class java.lang.String
    at org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:39)
    at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1201)
    at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:1126)
    at org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1349)
    at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:709)
    at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:673)
    at org.drools.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:228)
    at com.sample.DroolsTest.main(DroolsTest.java:31)

Environment

  • JBoss Enterprise Business Rules Managment System (BRMS) - 5.3.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.