在流口水发动机代码中的kierepository中释放了什么
我正在春季浏览流口水引擎代码,我找不到在流口水引擎中使用Kie存储库和ReleaseID的用途。我在下面附上了示例代码
public KieContainer kieContainer() throws IOException {
KieRepository kieRepository = getKieServices().getRepository();
kieRepository.addKieModule(new KieModule() {
public ReleaseId getReleaseId() {
return kieRepository.getDefaultReleaseId();
}
});
KieBuilder kieBuilder = getKieServices()
.newKieBuilder(kieFileSystem())
.buildAll();
return getKieServices().newKieContainer(kieRepository.getDefaultReleaseId());
I was going through drool engine code for spring I am not able to find what is the use of kie repository and releaseId in drool engine.I have attached the sample code below can some one explain me this what does it do
public KieContainer kieContainer() throws IOException {
KieRepository kieRepository = getKieServices().getRepository();
kieRepository.addKieModule(new KieModule() {
public ReleaseId getReleaseId() {
return kieRepository.getDefaultReleaseId();
}
});
KieBuilder kieBuilder = getKieServices()
.newKieBuilder(kieFileSystem())
.buildAll();
return getKieServices().newKieContainer(kieRepository.getDefaultReleaseId());
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当您在
kjar
中发布规则时,将它们发布到Maven存储库中。这就是“ Kie存储库” - 带有您的规则初始化的Maven存储库。发布ID是工件ID。您正在查看的逻辑是如何从Maven存储库中汲取KJAR并从中部署规则。
另外,您可以在本地保留DRL文件(或XLSX决策表,或者不是什么),并且不会为存储库或发布ID而打扰。
When you publish your rules in a
kjar
, they're published to a Maven repository. That's what the "kie repository" is -- the Maven repository with the your rules init. The release id is the artifact id.The logic you're looking at is how to pull a kjar from a Maven repository and deploy the rules from it.
Alternatively, you could keep your DRL files (or XLSX decision tables, or what not) locally and not bother with either the repository or release id.