"incompatible types" error when converting "drools" variable into KnowledgeHelper class with drools-model-compiler

Solution Verified - Updated -

Issue

When using executable model ("drools-model-compiler") to build a project which has rules using drools variable and tries to convert it into org.drools.core.spi.KnowledgeHelper class, following error will be reported in some newer version of "drools-model-compiler" compiler:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile-1) on project precompile-demo: Compilation failure
[ERROR] /path/to/precompile-demo/target/generated-sources/drools-model-compiler/main/java/com/ex/demo/PF0/LambdaConsequenceF05F900892C9C0080DD3CE63F75D4E84.java:[21,35] incompatible types: org.drools.model.Drools cannot be converted to org.drools.core.spi.KnowledgeHelper

Environment

  • Red Hat Decision Manager
    • 7.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