[rules-users] Preventing re-evaluation on modification of 'output' fact

Jamie jshaw at llbean.com
Wed Oct 26 12:24:46 EDT 2011


We're building a fraud detection application that uses rules to analyze
orders and the buyers and recipients on those orders.  As rules fire, they
modify an 'output' fact, which is an object whose only intent is to record
the results as rules fire.  It's not used in the LHS of any rules other than
to get a handle to it, e.g.:

rule "Rule 001 - Operator Flagged"

	enabled (FraudRuleEvaluationHelper.isRuleEnabled("Rule 001 - Operator
Flagged"))
		
	ruleflow-group "orderAnalysis"
	
	lock-on-active
	
	when
		$order:   OrderFact(operatorFlagged==true)
		$results: FraudResultsDTO()
	then
		modify($results) {
			addOrderSuspectReason("O")
		};
		
		FraudRuleConsequenceHelper.logRuleFiring($order.getOrderId(), "001");
end

We're finding that as the number of facts increases, the processing team
increases dramatically and I'm wondering if modifying the output fact the
way we do causes the rules to get re-evaluated to see if any activations
should be created or cancelled.  Would removing the modify block help
anything?  Should we be thinking about this in some other way?



--
View this message in context: http://drools.46999.n3.nabble.com/Preventing-re-evaluation-on-modification-of-output-fact-tp3455022p3455022.html
Sent from the Drools: User forum mailing list archive at Nabble.com.



More information about the rules-users mailing list