How can i access the rules (which i have created in Drools Guvnor) to my java application?
plz give me some example....

i have tried with below code, is there any mistakes?? if yes pls mention....


private static KnowledgeBase createKnowledgeBase() {

KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();

KnowledgeAgent kagent = KnowledgeAgentFactory.newKnowledgeAgent( "MyAgent" );

KnowledgeAgentConfiguration kaconf = KnowledgeAgentFactory.newKnowledgeAgentConfiguration();

kaconf.setProperty( "drools.agent.scanDirectories", "false" ); 

kagent.applyChangeSet( ResourceFactory.newUrlResource("http://localhost:8080/guvnor/rest/packages/ProductPositionAlert/assets/change-set.xml/source") ); 

return   kbase;

}



my guvnor package sanpshot details are

Inline image 2


thanks in advance
--
Regards
 sainadh