[rules-users] Rules Hello Evalution
freejava
freejava3 at gmail.com
Wed Dec 21 12:53:23 EST 2011
Thanks for the explanation. I think I got it.
Here is my scenario: I have n number of parties in the memory. I have to
perform the validation on each party for the party type. If it fails then
add an error message(just one) to the collection of that particular party.
So I rewrote the rule as below
rule "041"
when
Party(partyType != null, partyType.trim() != "",
partyType not in ("MF", "SE", "BY", "ST", "LG",
"CS", "CN"), $e : dentificationGrp.errors)
then
appendMessage($e, drools)
end
Now I have two objects :
p1 : Party(partyType=*"SE *", List<String> errors) and p2 :
Party(partyType=*"CS "* ,List<String> errors);
After consequence is fired both p1 and p2 has 2 error message of type "041".
where as the expected result should be 1 error message for p1 and p2. How
can I acheive that ?
--
View this message in context: http://drools.46999.n3.nabble.com/Rules-Evalution-tp3602504p3604691.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
More information about the rules-users
mailing list