Michael Katai wrote:
Hello!

I've googeled and searched the mailing list archive, but i couldn't solve my
current problem:
Every time i create a new rule (while runtime) i use:

  PackageBuilder builder = new PackageBuilder();
  builder.addPackageFromDrl(source);
  if(builder.hasErrors())
    ...
  Package pkg = builder.getPackage();
  ruleBase.addPackage(pkg);
  session.fireAllRules();

Every time, fireAllRules is executed, only the last, newest rule will fired.
Where is my mistake?
It's hard to tell, but I'm guessing that all the existing rules have already been fulling matched and fired. Adding more rules will not cause those old rules to rematch against existing data.
ruleBase (and factspace) is created as
  session = ruleBase.newStatefulSession();
  factspace = new FactSpace(session);

thanks in advance,
   michael

_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users


_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to