I'm trying to use the accumulate function in my rules, but I haven't the expected result. this is my rule:
rule "Total days"
$total : Number() from accumulate(Item(item=="days", $val:value) from $mo.items, sum( $val ) )
Suppose that tha values of MyObject(id, arrayList<Item> items) are:
the result should be 2+5+7 = 14 but instead it print me 3 value:
.... where I wrong? I want the sum of the days...!
please help me..!
Retrieving data ...