[rules-users] drl execution problem

arup arup4u2007 at gmail.com
Thu Mar 29 03:16:05 EDT 2012


i have one drl like below:

rule "FirstNameDifference"
no-loop true
lock-on-active true
	when
		person1: Person( $firstName1: firstName )
		person2: Person( firstName != $firstName1 )
		
	then
		dataDifferenceVO.getDataDiffArray().add("Person/FirstName");
end

i'm passing a list of objects in which i have 2 person type objects. my aim
is to check if the firstnames are same or different. if its different i need
to add one String to the DataDiffArray that is declared inside
DataDifferenceVO class.

but as i pass 2 person objects in the WM the rule is getting executed twice.
i.e, the string "Person/FirstName" is getting added twice in the array list.
why is this happening?... the rule should compare 2 firstnames and return
one String...is not that?... what step should i take to achive what i
want....
Thanks a lot i advance... :) :) :)

--
View this message in context: http://drools.46999.n3.nabble.com/drl-execution-problem-tp3866929p3866929.html
Sent from the Drools: User forum mailing list archive at Nabble.com.



More information about the rules-users mailing list