[rules-users] Flow isn't behaving as I'd expect

Jamie jshaw at llbean.com
Tue Jul 26 13:26:58 EDT 2011


I'm having some issues with the interaction between Flow, ruleflow-groups and
AgendaFilters.  I've tried it with 5.1.1, 5.2.0 using .rf files and 5.2.0
using .bpmn files, all with the same results, so I'm sure I'm just
misunderstanding something.

I have a flow that looks like this:
http://drools.46999.n3.nabble.com/file/n3200994/fraud_analysis_flow.jpg 

Rules 011 and 051 are in ruleflow-group customerAnalysis and rule 018 is in
ruleflow-group customerActivityFilterAndLookup. I added some debugging via
event listeners and if I don't use an agenda filter, I see the following
output:   

	Executing test Rule018TestCase001
	Rules engine initialized
	Invoking rules for rule name Rule 018 - Good AVS Buyer
	Created activation for [Rule 018 - Good AVS Buyer]
	Created activation for [Rule 011 - Bad Zip 9 Address]
	Created activation for [Rule 051 - Suspicious Buyer Email]
	Triggered node [Order Analysis]
	Triggered node [Start Fraud Analysis Flow]
	Triggered node [Customer Analysis]
	About to fire [Rule 051 - Suspicious Buyer Email]
	====> Rule 051 fired for order: 000000022
	About to fire [Rule 011 - Bad Zip 9 Address]
	====> Rule 011 fired for order: 000000022
	Triggered node [Customer Activity Filter And Lookup]
	About to fire [Rule 018 - Good AVS Buyer]
	Created activation for [Rule 051 - Suspicious Buyer Email]
	Created activation for [Rule 011 - Bad Zip 9 Address]
	====> Rule 018 fired for order: 210105
	Triggered node [Customer Activity Analysis]
	Triggered node [Suspect Reason Code Review]
	Triggered node [End Fraud Analysis Flow]
	Rules executed successfully

The results are roughly what I'd expect, but I have some questions:

	- Why do the activations get created for these 3 rules before any flows
have started?
	- Why does the [Order Analysis] node get triggered before the [Start Fraud
Analysis Flow] node?
	- Why are activations created again for 011 and 051 just prior to 018
firing?
	
If I introduce an AgendaFilter that only allows a rule with a specific name
to fire, things get stranger to me.  If I only allow rule 018, I get the
following output:

	Executing test Rule018TestCase001
	Invoking rules for rule name Rule 018 - Good AVS Buyer
	Created activation for [Rule 018 - Good AVS Buyer]
	Created activation for [Rule 011 - Bad Zip 9 Address]
	Created activation for [Rule 051 - Suspicious Buyer Email]
	Triggered node [Order Analysis]
	Triggered node [Start Fraud Analysis Flow]
	Triggered node [Customer Analysis]
	Rejecting firing of [Rule 051 - Suspicious Buyer Email] because name
doesn't match.
	Cancelled activation for [Rule 051 - Suspicious Buyer Email] because FILTER
	Rejecting firing of [Rule 011 - Bad Zip 9 Address] because name doesn't
match.
	Cancelled activation for [Rule 011 - Bad Zip 9 Address] because FILTER
	Rules executed successfully

Ruleflow customerActivityFilterAndLookup doesn't even get triggered, nor do
any nodes after that. Why not?

--
View this message in context: http://drools.46999.n3.nabble.com/Flow-isn-t-behaving-as-I-d-expect-tp3200994p3200994.html
Sent from the Drools: User forum mailing list archive at Nabble.com.



More information about the rules-users mailing list