I'm having trouble figuring out syntax for my rules - could someone please
steer me in the right direction - it's been a frustrating few days and no
luck. I need to check existence of various attributes from the
SHIPMENT_MOVE fact against a list of values (same list) I fetch from the
DB...
Get $valuesList from a DAO - then...
If SHIPMENT_MOVE.customer_code = "abc" and SHIPMENT_MOVE.reference_code
exists in $valuesList
OR
SHIPMENT_MOVE.customer_code = "abc" and SHIPMENT_MOVE.shipping_code exists
in $valuesList
OR
SHIPMENT_MOVE.customer_code = "abc" and SHIPMENT_MOVE.partner_code exists in
$valuesList
I have the following rule working fine:
$shipment SHIPMENT_MOVE(customer_code = "abc")
LookupTableResult ( resultValue == 1 ) from lookupDAO.getLookup(...)
But I'm having real problems with writing a rule like this:
when
SHIPMENT_MOVE(customer_code == "abc", $list contains ship_code) OR
SHIPMENT_MOVE(customer_code == "abc", $list contains deliver_code) OR
SHIPMENT_MOVE(customer_code == "abc", $list contains port_code)
Your guidance will be appreciated -
Thanks,
James
P.S.
I'm using Drools 3.1.0M1
--
View this message in context:
http://www.nabble.com/Struggling-with-Rule-syntax---please-help...-tf3408...
Sent from the drools - user mailing list archive at
Nabble.com.