As a follow-up to RHDM-1754, we have a case with the following rule snippet:
$s2Latest: ParticipantEvent() from accumulate(
$t2: ParticipantEvent(
this != $t1,
this meets[2h] $t1,
location == "JEWELLERY_STORE"),
init(Collector c = new Collector(); c.pEvent = null,
action( if(null == c.pEvent)
else{
if($t2.getRegisteredTime() > c.pEvent.getRegisteredTime())
}
),
reverse(),
result(c.pEvent)
)
Collector is just a POJO with a pEvent variable.
Compiling this with the executable model fails with:
Caused by: org.drools.mvelcompiler.MvelCompilerException: RHS doesn't have a type
at org.drools.mvelcompiler.LHSPhase.lambda$getRHSType$20 (LHSPhase.java:371)
at java.util.Optional.orElseThrow (Optional.java:408)
at org.drools.mvelcompiler.LHSPhase.getRHSType (LHSPhase.java:371)
at org.drools.mvelcompiler.LHSPhase.lambda$visit$3 (LHSPhase.java:125)
How can the return type be defined here? Reproducer project attached.
- clones
-
DROOLS-6426 Executable model compilation failure with inline accumulate
- Resolved