Skip to content

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

Open
apache/incubator-kie-drools
#6105
@samuel-beniamin

Description

@samuel-beniamin

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:dmnRelated to DMNarea:engineRelated to the runtime engines

    Type

    No type

    Projects

    • Status

      📋 Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions