在执行结果中获取中间 DMN 决策。

huangapple go评论56阅读模式
英文:

Get Intermediate DMN decisions in execution result

问题

我必须在Business Central中创建一个DMN模型,其中包含超过50个DMN决策(结构化为树状)。我已将其拆分为不同的决策服务,以避免一个庞大的DMN模型(难以维护)。

我想查看每个决策的结果(中间和最终决策),但使用决策服务会隐藏中间决策的结果。

DMN模型

在DMN评估结果中是否有一种方法可以获取Decisions R_0_X_X的结果?

我在DMN执行结果中找不到R_0以下的决策的详细信息:

        "R_0": {
            "R_0_Eval_agent_bankklantDS": "function R_0_Eval_agent_bankklantDS( input )"
        },
        "R_0_Eval_agent_bankklant": "B",
        "R_1_Voorlopige_eindevaluatie": "green",
        "evaluationResult": "green"
英文:

I have to create a DMN model with mmore than 50 DMN decisions (structured like a tree) in Business central .I have splitted it in different Decision services to not have a large DMN model (difficult to maintain).
I want to see the results of each Decision (intermediate & final decisions) but using Decision service hide the results of intermediate decisions.

DMN model

Is it a way to get the result of Decisions R_0_X_X in the DMN evaluation results?

I got no details for Decisions below R_0 in DMN execution result:

        "R_0": {
            "R_0_Eval_agent_bankklantDS": "function R_0_Eval_agent_bankklantDS( input )"
        },
        "R_0_Eval_agent_bankklant": "B",
        "R_1_Voorlopige_eindevaluatie": "green",
        "evaluationResult": "green"

答案1

得分: 1

但是使用决策服务隐藏了中间决策的结果

这是 DMN 中决策服务语义的目标,它封装了一些逻辑,只有 outputDecisions 可作为调用的结果获得,而 encapsulatedDecision 不应在结果中可用。

我假设你需要"中间决策的结果"用于调试信息,在这种情况下,实施自己的 DMNRuntimeEventListener 是适当的策略:

参考链接:

https://docs.drools.org/7.74.0.Final/drools-docs/html_single/index.html#dmn-properties-ref_dmn-models:~:text=org.kie.dmn.runtime.listeners.%24LISTENER_NAME

https://github.com/kiegroup/drools/blob/948a4482b4499efed8c28ce4a626af5f942aa9ad/kie-dmn/kie-dmn-api/src/main/java/org/kie/dmn/api/core/event/DMNRuntimeEventListener.java#L19

英文:

> but using Decision service hide the results of intermediate decisions

That is the goal of Decision Service semantic in DMN, it encapsulates some of the logic, as only the outputDecisions are available as a result of the invocation, while encapsulatedDecision are not to be made available in the results.

I assume you need the "results of intermediate decisions" for debugging information, in that case implementing your own DMNRuntimeEventListener is the appropriate strategy:

References:

https://docs.drools.org/7.74.0.Final/drools-docs/html_single/index.html#dmn-properties-ref_dmn-models:~:text=org.kie.dmn.runtime.listeners.%24LISTENER_NAME

https://github.com/kiegroup/drools/blob/948a4482b4499efed8c28ce4a626af5f942aa9ad/kie-dmn/kie-dmn-api/src/main/java/org/kie/dmn/api/core/event/DMNRuntimeEventListener.java#L19

huangapple
  • 本文由 发表于 2023年7月17日 18:39:33
  • 转载请务必保留本文链接:https://go.coder-hub.com/76703652.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定