Are you adding rules one by one? Or are you adding files that contains
multiple rules?
If you are adding rules one by one you could try something like this:
1. create a kbase
2. for each rule:
1. create a kbuilder
2. add the rule to the kbuilder
3. add the generated package to kbase (only if there are no
compilation errors)
Best Regards,
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Esteban Aliverti
- Developer @
http://www.plugtree.com
- Blog @
http://ilesteban.wordpress.com
On Mon, Feb 14, 2011 at 8:14 AM, hyjshanghai <hyjshanghai(a)gmail.com> wrote:
Please refer to the Drools Reference Document.
http://downloads.jboss.com/drools/docs/5.1.1.34858.FINAL/drools-expert/ht...
http://downloads.jboss.com/drools/docs/5.1.1.34858.FINAL/drools-expert/ht...
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-Co...
Sent from the Drools - User mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users