[JBoss JIRA] Created: (JBRULES-1231) Functions do not get added to new BRMS package when package imported from drl file
by Shahad Ahmed (JIRA)
Functions do not get added to new BRMS package when package imported from drl file
----------------------------------------------------------------------------------
Key: JBRULES-1231
URL: http://jira.jboss.com/jira/browse/JBRULES-1231
Project: JBoss Rules
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-brms
Affects Versions: 4.0.1
Environment: BRMS running on Windows XP SP2, with JBoss 4.2GA
Reporter: Shahad Ahmed
Assigned To: Mark Proctor
When you create a new package in the BRMS by importing an existing DRL file then any functions in the DRL file do not get added to the list of functions for the newly created package. Instead, the functions appear along with the import statements in the "header" text box found when you click on "Edit Package configuration" for the new package!
To recreate:
Put the example rules below into a .drl file and import it into the BRMS by creating a new package and choosng the option to load it from a .drl file.
Click on the newly created package com.acme.example in the package browser. Click on the Functions tab for the package. No functions are present.
Click on com.acme.example in the package browser and then select "Edit Package configuration". In the Header text box you should see the two functions defined in the example DRL file given below.
package com.acme.example
import java.util.Set;
function int firstFunction ()
{
return 1;
}
function int secondFunction ()
{
return 2;
}
rule "Rule 1"
when
eval(firstFunction() == 1)
then
System.out.println("Function 1");
end
rule "Rule 2"
when
eval(secondFunction() == 2)
then
System.out.println("Function 2");
End
--
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
18 years, 2 months
[JBoss JIRA] Created: (JBRULES-1206) ParserException on misplaced parenthesis
by Matija Kejzar (JIRA)
ParserException on misplaced parenthesis
----------------------------------------
Key: JBRULES-1206
URL: http://jira.jboss.com/jira/browse/JBRULES-1206
Project: JBoss Rules
Issue Type: Task
Security Level: Public (Everyone can see)
Components: Drl Parser/Builder
Affects Versions: 4.0.1
Environment: Windows XP SP2
Reporter: Matija Kejzar
Assigned To: Mark Proctor
The following exception is thrown on parsing of the attached rules (see attached file). Take note of the incorrect parenthesis in the eval statement on the WorkerPerformanceContext condition lines. Also, please note these rules were generated by the spreadsheet compiler from an .xls decision table.
Here is the exception:
Caused by: org.drools.compiler.DroolsParserException: Unknown error while parsing. This is a bug. Please contact the Development team.
at org.drools.compiler.DrlParser.compile(DrlParser.java:180)
at org.drools.compiler.DrlParser.parse(DrlParser.java:61)
at org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:156)
... application code
--
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
18 years, 2 months