Compilation with executable model fails when comparing BigDecimal and String
Issue
KJAR build fails with executable model when comparing BigDecimal type and String type property like the following.
rule "rule_compare_BigDecinal_and_String"
no-loop true
when
$fact : Fact( $bd: bd )
$code : Code( id == $bd )
then
System.out.println("***** $fact = "+$fact+", $code = "+$code);
end
In this example, bd is BigDecimal type property of Fact class, and id is String type property of Code class.
Executable model build fails with the following error:
[ERROR] Failed to execute goal org.kie:kie-maven-plugin:7.59.0.Final-redhat-00006:generateModel (default-generateModel) on project kjarCreation: Execution default-generateModel of goal org.kie:kie-maven-plugin:7.59.0.Final-redhat-00006:generateModel failed: [com/example/reproducer/P22/LambdaExtractor22353C40A1384D56E5C5AEF7CBBEECB5.java (25:858) : Cannot cast from BigDecimal to String] -> [Help 1]
Environment
- Red Hat Decision Manager
- 7.12.0
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.