[rules-users] How to Ignore Rule Compilation Error and Continue to Compile Other Rules?

hyjshanghai hyjshanghai at gmail.com
Mon Feb 14 06:14:28 EST 2011


Please refer to the Drools Reference Document.
http://downloads.jboss.com/drools/docs/5.1.1.34858.FINAL/drools-expert/html/ch02.html#d0e254
http://downloads.jboss.com/drools/docs/5.1.1.34858.FINAL/drools-expert/html/ch02.html#d0e254 

Sample code from it to add rules in a drl file.:

KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add( ResourceFactory.newClassPathResource(
"licenseApplication.drl", getClass() ),
              ResourceType.DRL );
if ( kbuilder.hasErrors() ) {
    System.err.println( builder.getErrors().toString() );
}
kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() );

-- 
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/How-to-Ignore-Rule-Compilation-Error-and-Continue-to-Compile-Other-Rules-tp2490203p2491824.html
Sent from the Drools - User mailing list archive at Nabble.com.



More information about the rules-users mailing list