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

Write an event if a decision evaluation failed #8235

Closed
Tracked by #8083
saig0 opened this issue Nov 18, 2021 · 6 comments · Fixed by #8816
Closed
Tracked by #8083

Write an event if a decision evaluation failed #8235

saig0 opened this issue Nov 18, 2021 · 6 comments · Fixed by #8816
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

@saig0
Copy link
Member

saig0 commented Nov 18, 2021

Description

If a business rule task is activated and the evaluation of a decision fails (e.g. missing variables, unexpected variable type, etc.) then we should create an incident. Additionally, we should write an event that reflects the partial evaluation of the decision. It may helps the user to understand what went wrong.

  • write the same event as defined in Write an event for a decision evaluation #8115
  • create a new intent failed
  • add a new property evaluationFailure that contains the failure message
  • it should include context data about the process instance that the decision is called from
  • it should include all available data about the evaluation that is provided from the DMN module
    • if a required decision was evaluated successfully then it should include the result
    • if a decision table was evaluated and the inputs were evaluated successfully then it should include the input values
  • the last decision result in the list should indicate the failed decision
  • add a new property failedDecisionId that contains the id of the failed decision

blocked by #8115
blocked by #8095

@saig0 saig0 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 Nov 18, 2021
@saig0 saig0 added this to the Evaluate DMN decisions milestone Nov 18, 2021
@saig0 saig0 added this to Planned in Zeebe Nov 18, 2021
@menski
Copy link
Contributor

menski commented Nov 22, 2021

@saig0 would we get some kind of error message in the decision event? Or what would be a way for the user to understand why the decision failed?

@menski
Copy link
Contributor

menski commented Nov 22, 2021

FYI @nazlikaya

@saig0
Copy link
Member Author

saig0 commented Nov 24, 2021

@menski good point 👍 I updated the description to add a new property evaluationFailure that contains the failure message.

@nazlikaya
Copy link

@saig0 will it be a single message or is it possible to have multiple error messages in an instance?

@saig0
Copy link
Member Author

saig0 commented Dec 6, 2021

@nazlikaya it will be a single message. At the moment, the evaluation is interrupted if something goes wrong (i.e. a missing variable or violation of the decision table's hit policy).

At some point in the future, we may have more information about the evaluation. For example, if the evaluation of a FEEL expression returns null because a built-in function was invoked with wrong arguments.

@saig0 saig0 mentioned this issue Dec 8, 2021
9 tasks
ghost pushed a commit that referenced this issue Dec 13, 2021
8330: Create a new module for DMN r=saig0 a=saig0

## Description

* create a new module `dmn` for parsing and evaluating of DMN decisions
* add a method to parse a DMN decision
* the parsed decision is returned as an object and should be used to evaluate the decision
* if the DMN is not valid then return an object that contains the failure message
  * decided against the usage of `Either` to align with the evaluation method (that will be added later)
  * if the evaluation fails then it should return the failure message but also the history of the evaluated decision (see #8235) 
  * the result of a successful evaluation is similar to a not successful one - so, we probably want to use the same result restructure instead of an `Either` type  

## Related issues

closes #8063 



Co-authored-by: Philipp Ossler <philipp.ossler@gmail.com>
@saig0
Copy link
Member Author

saig0 commented Feb 2, 2022

Suggestion

We could add an additional property failedDecisionId that holds the id of the failed decision. For a customer (e.g. Operate), it could be easier to use this property instead of reading the list of evaluated decisions.

@saig0 saig0 moved this from Planned to In progress in Zeebe Feb 21, 2022
@ghost ghost closed this as completed in 9bc1c8d Feb 23, 2022
@ghost ghost closed this as completed in #8816 Feb 23, 2022
Zeebe automation moved this from In progress to Done Feb 23, 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.

6 participants