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

DMNCompilerImpl calls DRG (Decision requirements graph) callbacks on all loaded models #1478

Open
samuel-beniamin opened this issue Sep 13, 2024 · 0 comments · May be fixed by apache/incubator-kie-drools#6105
Labels
area:dmn Related to DMN area:engine Related to the runtime engines

Comments

@samuel-beniamin
Copy link

Currently one of the responsibilities of the DMNCompilerImpl is to call all registered AfterProcessDrgElements after each model's evaluation. This behaviour is leading to some issues, since it doesn't validate of the DRG (Decision requirements graph) Compiler would accept the implementation or not? Or even if the current model is in fact the model that registered the callback at all. Instead it assumes two things, first, that the AfterProcessDrgElements or the DRGElementCompiler would check if the model is accepted by that DMN compiler, second, that the call back will be idempotent as well.

For the first assumption, my suggestion would be to actually check if the DRGElementCompiler accepts the model. For the second assumption we could do one of two things:

  1. Document the AfterProcessDrgElements to mention it must be ready to accept many calls that are not related. And/Or,
  2. DMNCompilerImpl should register the callback to the model that is related to it, and only call the callback on a valid and related model.

The current behaviour as is, was causing an issue that was partially addressed in a PR fixing incubator-kie-issues#1474.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:dmn Related to DMN area:engine Related to the runtime engines
Projects
Status: 📋 Backlog
3 participants