]
xb l updated DROOLS-4902:
-------------------------
Summary: Can not use mod operators (%) in when clause. (was: Can not use mod
operators (%) in when clouse.)
Can not use mod operators (%) in when clause.
---------------------------------------------
Key: DROOLS-4902
URL:
https://issues.redhat.com/browse/DROOLS-4902
Project: Drools
Issue Type: Bug
Components: core engine
Affects Versions: 7.31.0.Final
Reporter: xb l
Assignee: Mario Fusco
Priority: Major
When I study drools , I write a rule use divide operator
{code:java}
rule "Buzz" salience 2
when
$n: Number( this / 5 == 3 )
then
System.out.println("Buzz");
end
{code}
It's OK.
But:
{code:java}
rule "Buzz" salience 2
when
$n: Number( this % 5 == 0 )
then
System.out.println("Buzz");
end
{code}
Report parser error: Unable to Analyse Expression this % 5 == 0:
The drools document mentioned the same example:
Person( age > 100 && ( age % 10 == 0 ) )
% is Multiplicative operators, why parser error?