[rules-users] Dynamic Rules will not be executed

Michael Katai mk.others at gmx.at
Tue Feb 5 06:36:26 EST 2008


Thank you Mark and Edson!

 

That's it :-) I was bemused because of the name fireALLrules.

 

thank you for your help!

 

 

From: rules-users-bounces at lists.jboss.org
[mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Edson Tirelli
Sent: Tuesday, February 05, 2008 12:18 PM
To: Rules Users List
Subject: Re: [rules-users] Dynamic Rules will not be executed

 


   Since you are (re)using a stateful session, rules that fired before will
not fire again just because you changed the rulebase.
   This is expected behavior.

   []s
   Edson

2008/2/5, Michael Katai <mk.others at gmx.at>:

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?

ruleBase (and factspace) is created as
  session = ruleBase.newStatefulSession();
  factspace = new FactSpace(session);

thanks in advance,
   michael

_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users




-- 
  Edson Tirelli
  JBoss Drools Core Development
  Office: +55 11 3529-6000
  Mobile: +55 11 9287-5646
  JBoss, a division of Red Hat @ www.jboss.com 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20080205/760f5acc/attachment.html 


More information about the rules-users mailing list