[rules-users] [rule-users] OR with multiple binding in LHS
Francesco Campagnola
fcampagnola at gmail.com
Tue Mar 13 13:37:50 EDT 2007
Hi,
I'd like to write a rule that contains an OR condition in the LHS, to match
the presence in the working memory of an object with particular values of a
specific field. In the rest of LHS, i need to bind other values of the
specific object matched. Is there a particular sintax to use for the
binding?
For example:
rule "orCondition"
when
myObj : (MyObject(field1 == "a") or MyObject(field1 == "b"))
//correct column
field2: myObj.getField2 () // how to correctly get
field3: myObj.getField3() // those values?
then
System.out.println("fields = "+ field2 + field3);
Thanks in advance, FC.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070313/1530a6cb/attachment.html
More information about the rules-users
mailing list