If your rules look something like this:-<br><br>when<br>    Address( zipCode == null )<br>then<br>    //Report an invalid zipCode<br>end<br><br>You will need to extract the Address from the TaxPayer:-<br><br>when<br>    TaxPayer( $a : address )<br>
then<br>    insert( $a );<br>end<br><br>You will need to consider how to correlate the Address with the TaxPayer (to know which TaxPayer has an invalid Address).<br><br><div class="gmail_quote">On 5 September 2012 09:50, Suvek <span dir="ltr">&lt;<a href="mailto:suvek.shah@gmail.com" target="_blank">suvek.shah@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I have set of rules defined for Address validation.<br>
How do I reuse these rules when the Taxpayer object is passed in as fact<br>
which contains Address as one of the field (list to be precise)?<br>
Do I somehow need to extract and add addresses to working memory within the<br>
drl file?<br>
<br>
thanks<br>
S.<br>
<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Re-usability-of-rules-tp4019580.html" target="_blank">http://drools.46999.n3.nabble.com/Re-usability-of-rules-tp4019580.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></div><br>