[rules-users] All the values from one list must be present in other

Suvek suvek.shah at gmail.com
Mon Aug 20 06:20:31 EDT 2012


I tried looking for similar posts but could not find any that fits the
requirements.
Really speaking this is a 2 part question.

What I need to do is compare 2 lists and ensure that all the fields inside
the reference list are present in passed in list.

following is the simplified version of test that I want to perform... 

$requiredAddressTypes : List() from [ AddressType.BUSINESS,
AddressType.FOREIGN_BUSINESS ]
$taxpayer : Taxpayer(taxpayerType == TaxpayerType.FOREIGN_BUISINESS &&
addresses.size > 0, 
        			$addresses : addresses)

1 - Based on the taxpayer type I need to ensure that ALL the
requiredAddressTypes must be present, how can I achieve this?

2 - is the this statement correct ? ($requiredAddressTypes : List() from [
AddressType.BUSINESS, AddressType.FOREIGN_BUSINESS ])



--
View this message in context: http://drools.46999.n3.nabble.com/All-the-values-from-one-list-must-be-present-in-other-tp4019276.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list