Thanks a lot. Your suggestions has helped me improve my rule's performance. I have two more rule i need help with.
1. How do i check for condition of boolean variable without using eval like in the case below? rule CheckValidBinNumber when $br:BillingRecord(cardNo!=null || cardNo!="") $valid: Boolean() from checkValidity($br.cardNo) eval(!($valid)) then error(BillingRecordHelper.BIN_NO_INVALID_ERROR,log); end 2. How do i check if the value of variable created in when part without using eval? getMerchantNo is a function defined in the .drl file. If i dont use the condition eval($mno!="") then my rules gets fired in an infinte loop because there is one more rule which sets the value of billingActionCd in BillingRecord in working memory and it also triggers this rule. rule AssignMerchantNumber when $br:BillingRecord(merchantNo==null || merchantNo=="") $mno:String() from getMerchantNo($br.billingActionCd, $br.cardType, $br.salesSourceTypeCode, $br.posId) eval($mno!="") then modify($br){setMerchantNo($mno);} info(BillingRecordHelper.MERCHANT_NO_ASSIGNED_INFO,log); end I really appreciate your timely help for improving my rules. thanks ABRA2 -- View this message in context: http://old.nabble.com/Help-me-improve-my-rules-performance.-tp26261345p26366969.html Sent from the drools - user mailing list archive at Nabble.com. _______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users