I assume, the OP has a bunch of rules that validate Addresses.
The Addresses could be on TaxPayer, NonTaxPayer, Payee, Employee etc etc.
I also assume the OP did not want to repeat the Address validation in rules
containing the source of the Address.
As with all assumptions I might be wrong :)
Perhaps the OP can provide more detail.
On 5 September 2012 10:05, Wolfgang Laun <wolfgang.laun(a)gmail.com> wrote:
Why not use
TaxPayer( $addrList : addressList )
Address( zipCode == null) from $addrList
// report missing zip code because: if it is null, it is not
invalid - just missing ;-)
On 05/09/2012, Michael Anstis <michael.anstis(a)gmail.com> wrote:
> If your rules look something like this:-
> Address( zipCode == null )
> //Report an invalid zipCode
> You will need to extract the Address from the TaxPayer:-
> TaxPayer( $a : address )
> insert( $a );
> 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(a)gmail.com> wrote:
>> 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
>> drl file?
>> View this message in context:
>> Sent from the Drools: User forum mailing list archive at Nabble.com
>> rules-users mailing list
rules-users mailing list