[rules-users] Problem when using multiple rule files (Drools 5)

Wolfgang Laun wolfgang.laun at gmail.com
Thu Jul 23 07:02:45 EDT 2009


On 7/23/09, Olaf Raether <o.raether at epro.de> wrote:
>
> The code looks  like this:
>
> RuleBase ruleBase = RuleBaseFactory.newRuleBase();
> for (int i = 0; i < rules.length; i++) {
>       Package pkg = getPackage(i);
>       ruleBase.addPackage(pkg);
> }


I'd expect to find "Package pkg = rules[i];" or similar in the loop.
Anyway, this doesn't tell how the Package objects were created from your two
rules files, which might be significant.

Do you check for package build errors?

-W


for (int i = 0; i < facts.length; i++) {
>        Object fact = facts[i];
>        workingMemory.insert(fact);   // <<<<< Exception, when multiple rule
> files
> }
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20090723/87be03ac/attachment.html 


More information about the rules-users mailing list