dmn-scala
dmn-scala copied to clipboard
[PoC] Import decisions and BKMs from another DMN
Description
This is a proof-of-concept (PoC) to see how we could import decisions and BKMs from another DMN file.
The general idea:
- Store parsed decisions/BKMs in a repository.
- Ignore imported decisions/BKMs during the parsing.
- On evaluation, load the imported decisions/BKMs from the repository.
Open to-do's:
- [x] Move the loading of imported decisions/BKMs from the parser to the evaluation logic. The import is part of the evaluation.
- [x] Handle decisions/BKMs with namespaces natively (i.e. qualified names). Don't modify the name.
- [ ] Evaluate imported decisions/BKMs differently by wrapping them into a FEEL context. The evaluation interprets the qualified name as a path expression.
- [x] Handle the case if an imported decision/BKM is not present. Don't throw exceptions.
- [ ] Document the new public API.
- [ ] Write more test cases to cover edge cases.
- [ ] Fix the
InvocationTest.scala. Out of scope for this PR because the test was not really correct before.
Related issues
related to #71
I merged #225 into the branch and rebased it on main. :building_construction: