]
Luca Molteni commented on DROOLS-5608:
--------------------------------------
Thanks for reporting [~cchiru] this seems broken also in Drools legacy (non-executable
model) can you confirm this?
Cannot use method chaining as source for facts
----------------------------------------------
Key: DROOLS-5608
URL:
https://issues.redhat.com/browse/DROOLS-5608
Project: Drools
Issue Type: Bug
Components: executable model
Affects Versions: 7.42.0.Final
Reporter: Ciprian Chiru
Assignee: Luca Molteni
Priority: Major
Given the sample rule below:
{code:java}
import java.util.*;
global java.util.Set controlSet;
rule "will execute per each Measurement having ID color"
no-loop
when
Measurement( id == "color", $colorVal : val )
String() from Optional.of($colorVal).orElse("blah")
then
controlSet.add($colorVal);
end{code}
Compiling the resulting model fails with:
{code:java}
.../target/generated-sources/drools-model-compiler/main/java/rules/Rules79f20b1c9ba841128eaf4b2dbb336819RuleMethods0.java:[24,129]
cannot find symbol
[ERROR] symbol: variable $colorVal
[ERROR] location: class rules.Rules79f20b1c9ba841128eaf4b2dbb336819RuleMethods0{code}
Can be reproduced with _7.43.0-SNAPSHOT_