I have the following condition and consequence in one of my rules -
when
$position : PositionValuation() // returns 4 records
eval(helper.isSameDay($position.cobDate, $request.cobDate)) // filters 1,
so count =3
$pnl : PnL() from $position.pnl
$totalPnlValue : BigDecimal()
from accumulate(PnLTimeValue(type == "TOTAL", $pnlAmount : grc.value)
from $pnl.dtdAmount ,sum($pnlAmount))
then
logger.debug("variance :"+$totalPnlValue);
exception.setOrganisation($position.organisation);
exception.setCobDate($position.cobDate);
exception.setOrganisation($position.organisation);
exception.setTrade($position.trade);
$outputList.add(exception);
I want to have have the rule executed once for the accumulated value. How do
I achieve this?
Currently this gets executed 3 times.
Thanks,
Dwipin.
--
View this message in context:
http://drools.46999.n3.nabble.com/execute-once-for-an-accumulate-tp305942...
Sent from the Drools: User forum mailing list archive at
Nabble.com.