Drools accumulate

2019-08-31 13:29发布

问题:

Could someone please help me with this accumulate function accumulate

($sum: Repetition(objectId == getEventKey(), "VERY_LONG".equals(getRepType())); 
  $count: count($sum); $count== $vlongCount)

though the $count=10 and vlongcount=11 accumulate is still happening. is there any bug associted with accumulate function in Drools

回答1:

$count:Number(intValue == $vlongCount)
from accumulate(Repetition($sum: objectId == getEventKey(), "VERY_LONG".equals(getRepType())),$count: count($sum))