Hi ,
I have used the modify function. It works, but its time
consuming.Since the fact gets modified at RHS ,the rule engine reprocess
the same.But the time taken for execution is more.
If any body have better idea please help.
Regards
Sanal.P
/*#From row number: 21*/
rule "Package Rate_21"
salience 65515
when
$objOrderedComponents:AccumulatedComponent()
$packageDefinition:PackageDefinition($packageId:packageId)
$orderedComponent:OrderedComponent($id1:componentKey,$qty:componentQty)
from $objOrderedComponents.getOrderedComponentList() and
$accumulatedQty:Number()
from accumulate (
$accQtyComponent:OrderedComponent(packageChargeRecordId==$packageId, $AccQty
: componentQty) from
$objOrderedComponents.getOrderedComponentList(),sum($AccQty ) ) and
$pkgComps:PackageComponent(componentKey==$id1,(quantityLmt
=($qty+$accumulatedQty.intValue()))) from
$packageDefinition.getPackageComponentList()
then
$orderedComponent.setIsComponentApplicable(true);
$orderedComponent.setPackageChargeRecordId($packageId);
modify ($objOrderedComponents){};
end
--
View this message in context:
http://drools.46999.n3.nabble.com/Using-accumulate-function-tp3896078p389...
Sent from the Drools: User forum mailing list archive at
Nabble.com.