gpt4 book ai didi

访问 drools guvnor 的 java 代码

转载 作者:行者123 更新时间:2023-11-30 06:35:32 27 4
gpt4 key购买 nike

我们有一个项目要求通过 web 应用程序访问 guvnor。谁能告诉我如何通过 java 代码访问 guvnor?

最佳答案

抵押示例已经有一些示例代码。 Drools Expert 手册可能对其进行了详细解释。这是代码:

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>

关于访问 drools guvnor 的 java 代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5976677/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com