[rules-users] Using accumulate function-Performace Issues
Wolfgang Laun
wolfgang.laun at gmail.com
Tue Apr 10 10:51:27 EDT 2012
Your posts use several terms others aren't familiar with. It's
difficult to imagine the data model behind this rule snippet, and
that's why you don't receive any answers.
-W
On 10/04/2012, sanal <sanal.p at icthealth.com> wrote:
> 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-tp3896078p3899398.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
More information about the rules-users
mailing list