<br>   First of all, your approach does not sound like a good approach. If you are removing all rules and adding new ones, why not simply create a new knowledge base?<br><br>   Anyway, by default, drools fires all rules right after a rulebase is updated. To disable this behavior, you need to set a knowledge base configuration. Unfortunately setting this property now requires a down cast:<br>
<br>KnowledgeBaseConfiguration conf = ...<br>((RuleBaseConfiguration)conf).setRuleBaseUpdateHandler( null );<br><br>   I will add an option API to allow the configuration without the cast.<br><br>   []s<br>   Edson<br><br>
<br><br><div class="gmail_quote">2009/6/18 Pablo Navais <span dir="ltr">&lt;<a href="mailto:pnavais@gmail.com">pnavais@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,
<br><br>I&#39;m very new to Drools and don&#39;t know if this is possible, but i&#39;m trying to
<br>manually update the knowledge base with the following steps :
<br><br>1. Retrieve a knowledge builder from KnowledgeBuilderFactory
<br>2. Load a drl rules file into builder
<br>3. Create a knowledge base with the knowledge packages from the builder
<br>4. Create a session from the kbase
<br>4. Insert objects into the working memory =&gt; Activations are created
<br>5. Fire all rules =&gt; Rules are launched , objects are created by rules and
<br>asserted into the WM
<br>6. Retract objects generated by rules from the WM
<br>7. Remove knowledge packages from the kbase
<br>8. Generate another builder, load a different drl rules file and add the
<br>knowledge pacakges to the kbase =&gt; Activations are created automatically
<br>just after adding new packages but objects are created by rules and asserted
<br>into the WM.
<br>9. Fire all rules -&gt; Te agenda is empty , no rules are launched.
<br><br>Are the 8th and 9th steps the expected behaviour or i&#39;m just doing something
<br>wrong ?
The same seems to happen when <br><br>Thanks in advance.
<br><font color="#888888">Pablo.
</font><br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>  Edson Tirelli<br>  JBoss Drools Core Development<br>  JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>