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

Store DMN decision in the state #8069

Closed
Tracked by #8083
saig0 opened this issue Oct 27, 2021 · 1 comment · Fixed by #8572
Closed
Tracked by #8083

Store DMN decision in the state #8069

saig0 opened this issue Oct 27, 2021 · 1 comment · Fixed by #8572
Labels
kind/toil Categorizes an issue or PR as general maintenance, i.e. cleanup, refactoring, etc. scope/broker Marks an issue or PR to appear in the broker section of the changelog

Comments

@saig0
Copy link
Member

saig0 commented Oct 27, 2021

Description

We should store the DMN decisions and DRGs in the RocksDB state and allow access to the deployed decisions. We need the access to determine the version when deploying a new DMN resource and to evaluate a decision.

  • create a new state for DMN decisions and DRGs
    • the mutable interface allows inserting a new decision and a new DRG based on the records
    • the immutable interface allows accessing the latest decision/DRG based on a given decision id
    • cache the transformed/parsed decisions/DRGs to avoid costly parsing on repeated access
  • create new event appliers for the decision/DRG CREATED event
    • insert the decision/DRG in the state

blocked by #8067

@saig0 saig0 added kind/toil Categorizes an issue or PR as general maintenance, i.e. cleanup, refactoring, etc. scope/broker Marks an issue or PR to appear in the broker section of the changelog labels Oct 27, 2021
@saig0 saig0 added this to the Evaluate DMN decisions milestone Oct 27, 2021
@saig0 saig0 added this to Planned in Zeebe Oct 27, 2021
@saig0 saig0 moved this from Planned to In progress in Zeebe Jan 10, 2022
@saig0
Copy link
Member Author

saig0 commented Jan 11, 2022

The DMN decisions are put into the state only on partition 1 (i.e. the deployment partition). The distribution will be done by #8567.

@npepinpe npepinpe moved this from In progress to Review in progress in Zeebe Jan 11, 2022
ghost pushed a commit that referenced this issue Jan 14, 2022
8572: Store DMN decision in the state r=saig0 a=saig0

## Description

* create a new state to store DMN decisions and DRGs
  * the state returns a copy of the persisted object to avoid any side effects of reusing the same object
  * check the version of the decision/DRG before updating the latest version to avoid inconsistencies (i.e. defensive programming)    
* put the DMN decisions and DRGs in the state when applying the CREATED events

## Related issues

closes #8069 



Co-authored-by: Philipp Ossler <philipp.ossler@gmail.com>
@ghost ghost closed this as completed in 5e9ec95 Jan 14, 2022
Zeebe automation moved this from Review in progress to Done Jan 14, 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/toil Categorizes an issue or PR as general maintenance, i.e. cleanup, refactoring, etc. 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.

4 participants