Binding a list written in MVEL expression causes a build error in executable model.

Solution Unverified - Updated -

Issue

Binding a list written in MVEL expression like (*1-1) causes a build error like (*2) in executable model.

(*1) rule

package com.example.reproducer

import com.example.reproducer.Car

dialect "mvel"

rule "rule12a"
    when
        $car : Car( $group : ["compact", "medium", "luxury"] )    // ..... (*1-1)
    then
        System.out.println("***** Which group " + $group + " is " + $car + " categorized into?");
end

(*2)

$ mvn clean compile exec:exec -DgenerateModel=YES
...
[ERROR] Failed to execute goal org.kie:kie-maven-plugin:7.44.0.Final-redhat-00003:generateModel (default-generateModel) on project reproducer_model_compiler_12a: Execution default-generateModel of goal org.kie:kie-maven-plugin:7.44.0.Final-redhat-00003:generateModel failed: Encountered unexpected token: "[" "["
[ERROR]     at line 1, column 10.
[ERROR] 
[ERROR] Was expecting one of:
[ERROR] 
[ERROR]     "+"
[ERROR]     "++"
[ERROR]     "-"
[ERROR]     "--"
...

This issue does not occur in build with executable model disabled.

Environment

  • Red Hat Decision Manager (RHDM)
    • 7.1.0 - 7.10.0

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