]
Ciprian Chiru commented on DROOLS-5666:
---------------------------------------
For any additional questions related to this bug report, please address
[~erikwiklander] .
Cannot use date literals with the compiled model
------------------------------------------------
Key: DROOLS-5666
URL:
https://issues.redhat.com/browse/DROOLS-5666
Project: Drools
Issue Type: Bug
Components: executable model
Affects Versions: 7.43.1.Final
Reporter: Ciprian Chiru
Assignee: Luca Molteni
Priority: Major
as per
[
https://docs.jboss.org/drools/release/7.43.1.Final/drools-docs/html_singl...
given the rule:
{code:java}
rule "will execute per each Measurement having ID color"
no-loop
when
Measurement( date > "01-May-1990", $colorVal : val )
then
controlSet.add($colorVal);
end{code}
should work.
Instead it throws:
{code:java}
[...]/target/generated-sources/drools-model-compiler/main/java/rules/Rules54254744800a44aa8e98a0deb3d63bb0RuleMethods0.java:[26,159]
method alphaIndexedBy in class org.drools.model.PatternDSL cannot be applied to given
types;
[ERROR] required:
java.lang.Class<U>,org.drools.model.Index.ConstraintType,int,org.drools.model.functions.Function1<T,U>,U
[ERROR] found:
java.lang.Class<java.time.LocalDate>,org.drools.model.Index.ConstraintType,int,rules.P33.LambdaExtractor33FA9B82326DE87BF650FB57D8DB8143,java.lang.String
[ERROR] reason: inference variable U has incompatible bounds
[ERROR] equality constraints: java.time.LocalDate
[ERROR] lower bounds: java.lang.String{code}