Hi All,
I'm using Drools 5.x. I have the following class:
public class Machine{
...
private List rules = new ArrayList();
...
}
The 'rules' list holds strings. I would like from my rule to check whether
that list contains the string "rule2".
I've tried doing this in the following ways, but get compilation error:
rule "rule1"
when
/*1st attempt:*/ $m:Machine(rules contains "rule2")
/*2nd attempt:*/ $m:Machine(rules.contains("rule2") )
then
...
What am I doing wrong?
Thanks in advance !!!
--
View this message in context:
http://n3.nabble.com/How-to-check-an-array-field-from-LHS-of-a-rule-tp104...
Sent from the Drools - User mailing list archive at
Nabble.com.