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

DMN: refactor BaseFEELFunction getCandidateMethod #1370

Closed
Tracked by #997
gitgabrio opened this issue Jun 28, 2024 · 0 comments · Fixed by apache/incubator-kie-drools#6023
Closed
Tracked by #997

DMN: refactor BaseFEELFunction getCandidateMethod #1370

gitgabrio opened this issue Jun 28, 2024 · 0 comments · Fixed by apache/incubator-kie-drools#6023
Assignees
Labels
area:dmn Related to DMN area:engine Related to the runtime engines type:tech-debt Things that were left behind an may harm us in the future.

Comments

@gitgabrio
Copy link

THe BaseFEELFunction.getCandidateMethod is used to find /by reflection) the beste method to be invoked for BaseFunction execution.
The current implementation iterates over all the invoke methods available in the current class, and look for the best match. At the same time, it also "modify/adapt" input parameter, to find a possible "coerced" match (e.g. single item -> singleton list).
The problem with the current implementation is that it is hard to modify and somehow fragile, since it is cumebrsome to understand if a given match, found from "coerced" parameter, is actually "best" then another one (there is a score mechanism, but it seems also somehow limited).
BEside all of that, the method itself is a big, untested, black box, and being a critical part of execution, it should be deeped unit-tested.

Scope of this ticket is to revisit the overall implementation and see if it is possible a different, clearer, and extensively tested solution

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 type:tech-debt Things that were left behind an may harm us in the future.
Projects
Status: 🎯 Done
Development

Successfully merging a pull request may close this issue.

1 participant