Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add version to the evaluated decisions referred from a evaluated decision record #8867

Closed
korthout opened this issue Mar 1, 2022 · 0 comments · Fixed by #8869
Closed

Add version to the evaluated decisions referred from a evaluated decision record #8867

korthout opened this issue Mar 1, 2022 · 0 comments · Fixed by #8869
Assignees
Labels
kind/feature Categorizes an issue or PR as a feature, i.e. new behavior scope/broker Marks an issue or PR to appear in the broker section of the changelog

Comments

@korthout
Copy link
Member

korthout commented Mar 1, 2022

Is your feature request related to a problem? Please describe.
Similar to #8643, we've discovered the need for the version of the evaluated decisions of an EvaluatedDecisionRecord.

EvaluatedDecisionRecord already contains a decisionVersion. But, decisions can be individually updated by referring to them in different DRGs. So, while the decisionVersion of the evaluated decision is useful, it does not inform log consumers of the version of the evaluated required decisions.

This information is useful to Operate for filtering and sorting of the evaluated decisions data.

For more details, please read the slack discussion.

Describe the solution you'd like
Add decisionVersion to evaluatedDecisions of EvaluatedDecisionRecord.

Example:

{
    "decisionKey":1,
    "decisionId":"decision-id",
    "decisionName":"decision-name",
    "decisionVersion":1,
    "decisionRequirementsKey":2,
    "decisionRequirementsId":"decision-requirements-id",
    "decisionOutput":'"decision-output"',
    "processDefinitionKey":3,
    "bpmnProcessId":"bpmn-process-id",
    "processInstanceKey":4,
    "elementInstanceKey":5,
    "elementId":"element-id",
    "evaluatedDecisions":[
        {
            "decisionId":"decision-id",
            "decisionName":"decision-name",
            "decisionKey":6,
            "decisionVersion": 1,
            "decisionOutput":'"decision-output"',
            "decisionType":"DECISION_TABLE",
            "evaluatedInputs":[
                {
                    "inputId":"input-id",
                    "inputName":"input-name",
                    "inputValue":'"input-value"'
                }
            ],
            "matchedRules":[
                {
                    "ruleId":"rule-id",
                    "ruleIndex":1,
                    "evaluatedOutputs":[
                        {
                            "outputId":"output-id",
                            "outputName":"output-name",
                            "outputValue":'"output-value"'
                        }
                    ]
                }
            ]
        }
    ],
    "evaluationFailureMessage":"evaluation-failure-message",
    "failedDecisionId":"failed-decision-id"
}

Describe alternatives you've considered
The alternative is that this would be solved on Operate's side by consuming the deployment records. This adds additional logic to the importer which slows it down.

Of course, the same could be said for Zeebe, but Zeebe is much less slowed down by this than Operate. In addition, the data is already available for Zeebe at runtime. The only part that slows things down is the additional data that will be written in the records. Considering we also found this reasonable for decisionKey in #8643, I don't see why we can't also add decisionVersion.

The same can be said for increasing the record size, which does grow a bit, but not by an unreasonable amount.

Additional context
A similar change was done before in #8829, we can practically repeat these changes.

@korthout korthout added kind/feature Categorizes an issue or PR as a feature, i.e. new behavior scope/broker Marks an issue or PR to appear in the broker section of the changelog labels Mar 1, 2022
@korthout korthout added this to the Evaluate DMN decisions milestone Mar 1, 2022
@korthout korthout added this to Ready in Zeebe Mar 1, 2022
@korthout korthout moved this from Ready to In progress in Zeebe Mar 1, 2022
@korthout korthout moved this from In progress to Review in progress in Zeebe Mar 1, 2022
@korthout korthout self-assigned this Mar 1, 2022
@ghost ghost closed this as completed in 55d5f83 Mar 7, 2022
Zeebe automation moved this from Review in progress to Done Mar 7, 2022
@KerstinHebel KerstinHebel removed this from Done in Zeebe Mar 23, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes an issue or PR as a feature, i.e. new behavior scope/broker Marks an issue or PR to appear in the broker section of the changelog
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants