[rules-users] drl execution problem

Michael Anstis michael.anstis at gmail.com
Thu Mar 29 03:22:27 EDT 2012


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.

sent on the move

On 29 Mar 2012 08:16, "arup" <arup4u2007 at gmail.com> wrote:

> 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.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20120329/afc50550/attachment.html 


More information about the rules-users mailing list