<p>I suspect Person 1 and Person 2, plus Person 2 and Person 1 are matching. Try putting a sysout in the RHS showing the people matched to confirm.</p>
<p>sent on the move</p>
<p>On 29 Mar 2012 08:16, "arup" <<a href="mailto:arup4u2007@gmail.com">arup4u2007@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
i have one drl like below:<br>
<br>
rule "FirstNameDifference"<br>
no-loop true<br>
lock-on-active true<br>
when<br>
person1: Person( $firstName1: firstName )<br>
person2: Person( firstName != $firstName1 )<br>
<br>
then<br>
dataDifferenceVO.getDataDiffArray().add("Person/FirstName");<br>
end<br>
<br>
i'm passing a list of objects in which i have 2 person type objects. my aim<br>
is to check if the firstnames are same or different. if its different i need<br>
to add one String to the DataDiffArray that is declared inside<br>
DataDifferenceVO class.<br>
<br>
but as i pass 2 person objects in the WM the rule is getting executed twice.<br>
i.e, the string "Person/FirstName" is getting added twice in the array list.<br>
why is this happening?... the rule should compare 2 firstnames and return<br>
one String...is not that?... what step should i take to achive what i<br>
want....<br>
Thanks a lot i advance... :) :) :)<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/drl-execution-problem-tp3866929p3866929.html" target="_blank">http://drools.46999.n3.nabble.com/drl-execution-problem-tp3866929p3866929.html</a><br>
Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</blockquote></p>