Free form expression constraints: unexpected execution result; unexpected failure to
compile
---------------------------------------------------------------------------------------------
Key: JBRULES-3001
URL:
https://issues.jboss.org/browse/JBRULES-3001
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-compiler (expert)
Affects Versions: 5.2.0.CR1
Reporter: Wolfgang Laun
Assignee: Mark Proctor
Given
public class Customer {
int custid;
//...
}
The following rule always fires, for any value of custid.
rule "articles of a customer"
when
$c: Customer( 150 <= custid <= 250 ) returns true
then
System.out.println( "Customer1 " + $c.getCustid() );
end
But the constraint
$c: Customer( 100 <= custid )
is refused by the compiler:
Unable to build constraint as '100' is invalid : [Rule name='articles of
a customer']
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira