Are you adding rules one by one? Or are you adding files that contains multiple rules?<div><br></div><div>If you are adding rules one by one you could try something like this:</div><div><ol><li>create a kbase</li><li>for each rule:</li>

<ol><li>create a kbuilder</li><li>add the rule to the kbuilder</li><li>add the generated package to kbase (only if there are no compilation errors)</li></ol></ol><div><br></div></div><div>Best Regards,</div><div><br>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br>

<br>Esteban Aliverti<br>- Developer @ <a href="http://www.plugtree.com" target="_blank">http://www.plugtree.com </a><br>- Blog @ <a href="http://ilesteban.wordpress.com" target="_blank">http://ilesteban.wordpress.com</a><br>


<br><br><div class="gmail_quote">On Mon, Feb 14, 2011 at 8:14 AM, hyjshanghai <span dir="ltr">&lt;<a href="mailto:hyjshanghai@gmail.com">hyjshanghai@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<br>
Please refer to the Drools Reference Document.<br>
<a href="http://downloads.jboss.com/drools/docs/5.1.1.34858.FINAL/drools-expert/html/ch02.html#d0e254" target="_blank">http://downloads.jboss.com/drools/docs/5.1.1.34858.FINAL/drools-expert/html/ch02.html#d0e254</a><br>
<a href="http://downloads.jboss.com/drools/docs/5.1.1.34858.FINAL/drools-expert/html/ch02.html#d0e254" target="_blank">http://downloads.jboss.com/drools/docs/5.1.1.34858.FINAL/drools-expert/html/ch02.html#d0e254</a><br>
<br>
Sample code from it to add rules in a drl file.:<br>
<br>
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();<br>
kbuilder.add( ResourceFactory.newClassPathResource(<br>
&quot;licenseApplication.drl&quot;, getClass() ),<br>
              ResourceType.DRL );<br>
if ( kbuilder.hasErrors() ) {<br>
    System.err.println( builder.getErrors().toString() );<br>
}<br>
kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() );<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://drools-java-rules-engine.46999.n3.nabble.com/How-to-Ignore-Rule-Compilation-Error-and-Continue-to-Compile-Other-Rules-tp2490203p2491824.html" target="_blank">http://drools-java-rules-engine.46999.n3.nabble.com/How-to-Ignore-Rule-Compilation-Error-and-Continue-to-Compile-Other-Rules-tp2490203p2491824.html</a><br>


</font><div><div></div><div class="h5">Sent from the Drools - User mailing list archive at Nabble.com.<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>
</div></div></blockquote></div><br></div>