在流口水发动机代码中的kierepository中释放了什么

发布于 2025-01-26 05:26:09 字数 572 浏览 4 评论 0原文

我正在春季浏览流口水引擎代码,我找不到在流口水引擎中使用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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

顾铮苏瑾 2025-02-02 05:26:09

当您在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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文