Details
-
Bug
-
Resolution: Done
-
Major
-
None
-
7.40.0.Final
-
None
-
2020 Week 31-33 (from Jul 27)
-
-
NEW
-
NEW
Description
Given a rule as such (modified from the standard example):
global org.example.drools.service.DummyService dummyService; rule "will execute per each Measurement having ID color" no-loop when Measurement( id == "color", $colorVal : val ) $var1: String() from dummyService.dummy("a"); $var2: String() from dummyService.dummy("b"); $var3: String() from dummyService.dummy("c"); String() from dummyService.dummy($var1, $var2, $var3) then controlSet.add($colorVal); end
The org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile fails with:
no suitable method found for from(org.drools.model.Global<org.example.drools.service.DummyService>,org.drools.model.Variable<java.lang.String>,org.drools.model.Variable<java.lang.String>,org.drools.model.Variable<java.lang.String>,rules.PFD.LambdaExtractorFD1FA74D5FA8CFA329D97E34A42287FA) [ERROR] method org.drools.model.DSL.<T>from(T) is not applicable [ERROR] (cannot infer type-variable(s) T [ERROR] (actual and formal argument lists differ in length)) [ERROR] method org.drools.model.DSL.<T>from(org.drools.model.Variable<T>) is not applicable [ERROR] (cannot infer type-variable(s) T [ERROR] (actual and formal argument lists differ in length)) [ERROR] method org.drools.model.DSL.<T>from(org.drools.model.functions.Function0<T>) is not applicable [ERROR] (cannot infer type-variable(s) T [ERROR] (actual and formal argument lists differ in length)) [ERROR] method org.drools.model.DSL.<T>from(org.drools.model.Variable<T>,org.drools.model.functions.Function1<T,?>) is not applicable [ERROR] (cannot infer type-variable(s) T [ERROR] (actual and formal argument lists differ in length)) [ERROR] method org.drools.model.DSL.<A,B>from(org.drools.model.Variable<A>,org.drools.model.Variable<B>,org.drools.model.functions.Function2<A,B,?>) is not applicable [ERROR] (cannot infer type-variable(s) A,B [ERROR] (actual and formal argument lists differ in length)) [ERROR] method org.drools.model.DSL.<A,B,C>from(org.drools.model.Variable<A>,org.drools.model.Variable<B>,org.drools.model.Variable<C>,org.drools.model.functions.Function3<A,B,C,?>) is not applicable [ERROR] (cannot infer type-variable(s) A,B,C [ERROR] (actual and formal argument lists differ in length))
So the DSL.from() cannot accept more than 2 variables.
Attachments
Issue Links
- is related to
-
DROOLS-5548 Model compiler cannot generate declaration from a function call
- Closed