If your rules look something like this:-

when
    Address( zipCode == null )
then
    //Report an invalid zipCode
end

You will need to extract the Address from the TaxPayer:-

when
    TaxPayer( $a : address )
then
    insert( $a );
end

You will need to consider how to correlate the Address with the TaxPayer (to know which TaxPayer has an invalid Address).

On 5 September 2012 09:50, Suvek <suvek.shah@gmail.com> wrote:
Hi,

I have set of rules defined for Address validation.
How do I reuse these rules when the Taxpayer object is passed in as fact
which contains Address as one of the field (list to be precise)?
Do I somehow need to extract and add addresses to working memory within the
drl file?

thanks
S.





--
View this message in context: http://drools.46999.n3.nabble.com/Re-usability-of-rules-tp4019580.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users