[jboss-jira] [JBoss JIRA] (DROOLS-4468) Invalid result with collect, mvel and ForceEagerActivationOption.YES
Mario Fusco (Jira)
issues at jboss.org
Mon Aug 26 04:31:00 EDT 2019
[ https://issues.jboss.org/browse/DROOLS-4468?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mario Fusco updated DROOLS-4468:
--------------------------------
Sprint: 2019 Week 35-37
> Invalid result with collect, mvel and ForceEagerActivationOption.YES
> --------------------------------------------------------------------
>
> Key: DROOLS-4468
> URL: https://issues.jboss.org/browse/DROOLS-4468
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Affects Versions: 7.25.0.Final
> Reporter: Martin Weiler
> Assignee: Mario Fusco
> Priority: Major
> Attachments: case02445433-testcase.zip
>
>
> A rule updates a list in a fact:
> {noformat}
> rule "Init"
> dialect "mvel"
> when
> $fl: FactWithList(items.size()==0)
> then
> $fl.getItems().add("A");
> $fl.getItems().add("B");
> update($fl);
> end
> {noformat}
> A second rule verifies if other facts exist, matching the items in the updated list:
> {noformat}
> rule "Expected Outcome"
> dialect "mvel"
> when
> $fl: FactWithList($itemList : items != null)
> $l: java.util.ArrayList(size > 0) from collect(FactWithString($itemList contains stringValue));
> then
> System.out.println("--> Rule: " + kcontext.getRule().getName() + " fired, " + $fl + ", collect list: " + $l.size());
> end
> {noformat}
> This rule is *not* fired if
> * mvel dialect is used *and*
> * Drools is executed with {{ForceEagerActivationOption.YES}} (jBPM use case)
> Note: This worked in 7.17 and earlier!
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
More information about the jboss-jira
mailing list