[JBoss JIRA] Created: (JBRULES-1565) Importing multiple drl files for the same package: only the header information from the first one is evaluated
by Martin Putz (JIRA)
Importing multiple drl files for the same package: only the header information from the first one is evaluated
--------------------------------------------------------------------------------------------------------------
Key: JBRULES-1565
URL: http://jira.jboss.com/jira/browse/JBRULES-1565
Project: JBoss Drools
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: drools-brms
Reporter: Martin Putz
Assigned To: Michael Neale
Switching the order in which DRL files are imported in the BRMS results in a different package configuration header. Eg, taking the sudoku example, importing sudokuSolver.drl before sudokuValidator.drl yields package configuration header:
import org.drools.examples.sudoku.rules.PossibleCellValue;
import org.drools.examples.sudoku.rules.ResolvedCellValue;
while importing sudokuValidator.drl before sudokuSolver.drl yields:
import org.drools.examples.sudoku.rules.PossibleCellValue;
import org.drools.examples.sudoku.rules.ResolvedCellValue;
global java.util.List issues;
--
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, 1 month
[JBoss JIRA] Created: (JBRULES-1567) ArrayIndexOutOfBoundsException in sequential execution after calling RuleBase.addPackage(..)
by Ming Jin (JIRA)
ArrayIndexOutOfBoundsException in sequential execution after calling RuleBase.addPackage(..)
--------------------------------------------------------------------------------------------
Key: JBRULES-1567
URL: http://jira.jboss.com/jira/browse/JBRULES-1567
Project: JBoss Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Drl Parser/Builder
Affects Versions: 5.0.0-M1
Environment: All
Reporter: Ming Jin
Assigned To: Ming Jin
Priority: Minor
Fix For: 5.0.0-M1
ArrayIndexOutOfBoundsException would been thrown after the following steps:
1. Create a rulebase with sequential set to true.
2. Add a package to rulebase, execute the rules. The first execution would be successful.
3. Add another package to the same rulebase, then execute the rules. An ArrayIndexOutOfBoundsException would been thrown as the followings:
java.lang.ArrayIndexOutOfBoundsException: -1
at org.drools.common.ArrayAgendaGroup.add(ArrayAgendaGroup.java:140)
at org.drools.reteoo.RuleTerminalNode.assertTuple(RuleTerminalNode.java:309)
Sequential execution requires to set order before execution. Since the second addPackage call does not reset the "ordered" flag in ReteooRuleBase, the order was not correctly set for the newly added package.
--
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, 1 month