[jboss-jira] [JBoss JIRA] Assigned: (JBRULES-2719) Count in accumulate behaves incorrect in combination with update
Mark Proctor (JIRA)
jira-events at lists.jboss.org
Mon Nov 8 02:17:01 EST 2010
[ https://jira.jboss.org/browse/JBRULES-2719?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mark Proctor reassigned JBRULES-2719:
-------------------------------------
Assignee: Edson Tirelli (was: Mark Proctor)
> Count in accumulate behaves incorrect in combination with update
> ----------------------------------------------------------------
>
> Key: JBRULES-2719
> URL: https://jira.jboss.org/browse/JBRULES-2719
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 5.1.1.FINAL
> Reporter: Wouter Horré
> Assignee: Edson Tirelli
> Attachments: count.zip
>
>
> The following rule produces different results when update is used in contrast to when retract/insert is used (when a Container instance has changed):
> rule "Count With Accumulate"
> when
> $l : Leaf();
> Number($nb: intValue) from accumulate($c : Container(leafs contains $l), count($c));
> then
> System.out.println("Leaf " + $l.getName() + " with accumulate: " + $nb);
> end
> The following rule produces the correct result in both cases:
> rule "Count With Collect"
> when
> $l : Leaf();
> HashSet($nb : size) from collect(Container(leafs contains $l));
> then
> System.out.println("Leaf " + $l.getName() + " with collect: " + $nb);
> end
> I have attached a minimal example that triggers the behavior.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list