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