[rules-users] Problems parsing rules with brackets

Mark Proctor mproctor at codehaus.org
Mon Jan 15 19:27:59 EST 2007


if you look at the documentation it shows that you can only have a 
single Fact Pattern inside of a not node, nested Conditional Elements is 
not support in the 3.0.x branch. This is however supported in trunk.

Mark
bret wrote:
> Hi,
>
> We are having issues with Drools where we have rules with brackets in the
> "when" part of the rule.
>
> For example...
>
> rule "brackets"
> 	when
> 		 not ((DoubleFact(name == "a_fact", value > 60) or 
>                           StringFact(name == "another_fact", value !=
> "EMPLOYED")) 
>                          and DoubleFact(name == "yet_another", value < 10))
> 	then
> 		assert(new PolicyViolation("Badness", "Blah"));
> end
>
> (The NOT line originally does not have line breaks, all of the when clause
> is on one line)
>
> This will cause a parse error and it complains about the bracket after the
> NOT and at the end of the line.
>
> Why can't drools deal with this??
>   




More information about the rules-users mailing list