[
http://jira.jboss.com/jira/browse/JBRULES-1411?page=all ]
Ming Jin updated JBRULES-1411:
------------------------------
Attachment: testdrools.zip
Executing TestPrevixOr would result the following output:
Compiling
package test;
import test.Person;
rule testInfixOr
when
pensioner : (Person( sex == "f", age > 60 ) or Person( sex ==
"m", age > 65 ) )
then
pensioner.setPension(100);
end
Success
Compiling
package test;
import test.Person;
rule testPrefixOr
when
pensioner : (or Person( sex == "f", age > 60 ) Person( sex ==
"m", age > 65 ) )
then
pensioner.setPension(100);
end
org.drools.compiler.DroolsParserException: [5,17]: unknown:5:17 mismatched token:
[@23,76:77='or',<34>,5:17]; expecting type ID[5,51]: unknown:5:51 mismatched
token: [@43,110:115='Person',<7>,5:51]; expecting type RIGHT_PAREN[5,82]:
unknown:5:82 mismatched token: [@61,141:141=')',<12>,5:82]; expecting type
THEN
at TestPrefixOr.compileDrl(TestPrefixOr.java:49)
at TestPrefixOr.main(TestPrefixOr.java:36)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
Process finished with exit code 0
PrefixOr is Broken
------------------
Key: JBRULES-1411
URL:
http://jira.jboss.com/jira/browse/JBRULES-1411
Project: JBoss Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Drl Parser/Builder
Affects Versions: 4.0.3
Reporter: Ming Jin
Attachments: testdrools.zip
Tried to use PrefixOr in rules, but always receive compiler error. Used infixOr as work
around. But it seems a bug. Will attach a stand-alone sample app to demonstrate this
problem.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira