Most of the RightTuple's sinks are AccumulatorNodes. Here is one of the 80
rules that I believe cause my problem. The other 80 rules are similar, but
will change in the places I formatted in /italic/.

Some information on this rule:
* The EvemetierData is the business class. They are 10-100k instances in the
VM.
* It has a accompaning object EvemetierCalculDHF that store some temporary
rules data. In particular, the calculationMode to use for a given
field=attribute
* The AttributEvemetierDHF is a Meta information class with a dozen
instances (one per field to calculate in EvemetierData) in WM.
* The UNWRAP_NULL it there to enable Null values to passe the accumulator
(an Option would have been clearer)


rule "valo_2a_applyCalcMode_evemetiers_som_nivinf_1"
        salience -1110
        when
                $attDHF:AttributEvemetierDHF()
        
$evCalcDHF:EvemetierCalculDHF(calcModes.get($attDHF.calculationModeKey)=="/som_nivinf_1/")
                $obj:EvemetierData() from $evCalcDHF.evemetier
                accumulate (
  $src: EvemetierData (
/pere==$obj.niveau,
affperiode==$obj.affperiode,
typeeve_id==$obj.typeeve_id,
dteve==$obj.dteve,
suffixe==$obj.suffixe,/
  true);
   $acc1 :
sumWithNulls(/DIVIDE($src.getAttributeValue($attDHF.safeGetAttName("valo_2a_applyCalcMode_evemetiers_som_nivinf_1")),
$src.getAttributeValue($attDHF.safeGetCoefinterniv("valo_2a_applyCalcMode_evemetiers_som_nivinf_1")))/
)
);
        
$targetValue:Object(EQUALS(UNWRAP_NULL(this),$obj.getAttributeValue($attDHF.attName))==false)
from WRAP_NULL($acc1)
        then
                $obj.setAttributeValue($attDHF.getAttName(), 
UNWRAP_NULL($targetValue));
end



--
View this message in context: 
http://drools.46999.n3.nabble.com/Analysing-OutOfMemory-too-many-RightTuple-tp4029988p4029991.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to