Error in executable model generation when trying to bind an enum value

Solution Unverified - Updated -

Issue

Building rules written in MVEL dialect and trying to bind an enum value with executable rule model enabled causes an error.

When I build a maven project which contains rules trying to bind an enum value like (*1) with executable model enabled,

package com.example.reproducer

import com.example.reproducer.Bus

dialect "mvel"

rule "bus2"
   when
       $bus : Bus( $maker : Bus.Maker.HINO )    // ..... (*1)
   then
       System.out.println("bus=" + $bus + ", maker=" + $maker);
end

// Maker.HINO is an enum value declared in Bus class.

build error occurs with the message like below.

$ mvn clean compile -DgenerateModel=YES
...
[ERROR] Failed to execute goal org.kie:kie-maven-plugin:7.44.0.Final-redhat-00003:generateModel (default-generateModel) on project your_project: Execution default-generateModel of goal org.kie:kie-maven-plugin:7.44.0.Final-redhat-00003:generateModel failed.: CannotConvertException -> [Help 1]
...

Environment

  • Red Hat Decision Manager (RHDM)
    • 7.9.0 - 7.9.1

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