我们有一个项目要求访问guvnor通过web应用程序.Can谁让我知道如何通过java代码访问guvnor?
发布于 2011-05-19 20:54:51
抵押贷款示例已经有了一些示例代码。Drools的专家手册可能对此进行了详细的解释。代码如下:
private static KnowledgeBase readKnowledgeBase() throws Exception {
KnowledgeAgent kagent = KnowledgeAgentFactory
.newKnowledgeAgent( "MortgageAgent" );
kagent.applyChangeSet( ResourceFactory
.newClassPathResource( "changeset.xml" ) );
KnowledgeBase kbase = kagent.getKnowledgeBase();
kagent.dispose();
return kbase;
}
<?xml version="1.0" encoding="UTF-8"?>
<change-set xmlns='http://drools.org/drools-5.0/change-set'
xmlns:xs='http://www.w3.org/2001/XMLSchema-instance'
xs:schemaLocation='http://drools.org/drools-5.0/change-set drools-change-set-5.0.xsd'>
<add>
<resource
source='http://localhost:8080/guvnor-webapp/org.drools.guvnor.Guvnor/package/mortgages/LATEST'
type='PKG' basicAuthentication='enabled' username='admin' password='admin' />
</add>
</change-set>发布于 2011-05-12 20:17:05
我们应该在Guvnor参考手册中记录这一点。这是the issue。
https://stackoverflow.com/questions/5976677
复制相似问题