[
https://jira.jboss.org/jira/browse/JBRULES-2024?page=com.atlassian.jira.p...
]
Jared Davis commented on JBRULES-2024:
--------------------------------------
Wolfgang Laun suggested workaround at
http://article.gmane.org/gmane.comp.java.drools.user/14235
Add "drools." prefix to the insert text. This version compiles w/o an error.
String ruleBad = "package test\n" +
"expander expander.dsl;\n" +
"import dtest.Main;\n" +
"import javax.vecmath.Point3d;\n" +
"rule \"a.b\"\n" +
"agenda-group \"b\"\n" +
"when \n" +
"\n" +
"> comp : Main(x ==6)\n" +
"then\n" +
"> System.out.println(\"test\");\n" +
"> Point3d l = new Point3d();\n" +
"> l.x = comp.getX();\n" +
"> if (l.x < 1) {\n" +
"> drools.insert( new Main(\"FIRST.INLET\" , comp,
comp) );\n" +
"> } else {\n" +
"> insert( new Main(\"FIRST.INLET.NOT\" , comp,
comp) );\n" +
"> }\n" +
"> \n" +
"end";
Rule failes to compile in 5.0 March 20th SNAPSHOT. Compiles ok in
4.07
----------------------------------------------------------------------
Key: JBRULES-2024
URL:
https://jira.jboss.org/jira/browse/JBRULES-2024
Project: JBoss Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: drools-compiler
Environment: Win Xp sp3
Reporter: Jared Davis
Assignee: Mark Proctor
Attachments: Main.java, vecmath.jar
Attached code generates the following output. I would expect both rules to compile w/o an
error.
Start
Fails
Rule Compilation error : [Rule name='a.b']
test/Rule_a_b_0.java (11:488) : The method insert(Main) is undefined for the type
Rule_a_b_0
Works
Done
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira