See below.
On 20/08/2012, Suvek <suvek.shah(a)gmail.com> wrote:
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?
How does AddressType relate to addresses? Are all addresses of
different types or not?
2 - is the this statement correct ? ($requiredAddressTypes : List() from [
AddressType.BUSINESS, AddressType.FOREIGN_BUSINESS ])
No, it violates the DRL syntax. See the Drools Expert Manual for
examples of how to use "from".
But I don't think you'll need "from", unless you have oversimplified.
-W
--
View this message in context:
http://drools.46999.n3.nabble.com/All-the-values-from-one-list-must-be-pr...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users