[jboss-jira] [JBoss JIRA] (DROOLS-5550) Drools model compiler fails when assigning salience from a static constant

Ciprian Chiru (Jira) issues at jboss.org
Thu Jul 30 09:54:00 EDT 2020


Ciprian Chiru created DROOLS-5550:
-------------------------------------

             Summary: Drools model compiler fails when assigning salience from a static constant
                 Key: DROOLS-5550
                 URL: https://issues.redhat.com/browse/DROOLS-5550
             Project: Drools
          Issue Type: Bug
    Affects Versions: 7.40.0.Final, 7.39.0.Final, 7.38.0.Final, 7.37.0.Final, 7.36.0.Final, 7.35.0.Final, 7.34.0.Final, 7.33.0.Final, 7.32.0.Final, 7.31.0.Final
            Reporter: Ciprian Chiru
            Assignee: Mario Fusco


Given the example rule:
{code:java}
global java.util.Set controlSet;


rule "will execute per each Measurement having ID color"
salience Salience.NORMAL
no-loop
when
 Measurement( id == "color", $colorVal : val )
then
 controlSet.add($colorVal);
end{code}
when compiling the rules, the _org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile_  throws:
{code:java}
Compilation failure
[ERROR] .../target/generated-sources/drools-model-compiler/main/java/rules/Rules1b5c9512461f45df875fa525fff06227RuleMethods0.java:[28,109] no suitable method found for supply(int)
[ERROR] method org.drools.model.DSL.<A,R>supply(org.drools.model.Variable<A>,org.drools.model.functions.Function1<A,R>) is not applicable
[ERROR] (cannot infer type-variable(s) A,R
[ERROR] (actual and formal argument lists differ in length))
[ERROR] method org.drools.model.DSL.<A,B,R>supply(org.drools.model.Variable<A>,org.drools.model.Variable<B>,org.drools.model.functions.Function2<A,B,R>) is not applicable
[ERROR] (cannot infer type-variable(s) A,B,R
[ERROR] (actual and formal argument lists differ in length)){code}
 

The same rule works fine when the rule is not pre-compiled.



--
This message was sent by Atlassian Jira
(v7.13.8#713008)



More information about the jboss-jira mailing list