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

It's not possible to refer to an external nodes in informationRequirement and knowledgeRequirement #1411

Closed
yesamer opened this issue Jul 31, 2024 · 4 comments · Fixed by apache/incubator-kie-drools#6050
Labels
area:dmn Related to DMN area:engine Related to the runtime engines type:bug Something is behaving unexpectedly

Comments

@yesamer
Copy link

yesamer commented Jul 31, 2024

Using informationRequirement and knowledgeRequirement can refer to internal and external nodes using the href attribute.
Please notice the case of internal nodes above:

        <informationRequirement>
            <requiredDecision href="_decision_001"/>
        </informationRequirement>
        <informationRequirement>
            <requiredInput href="_input_001"/>
        </informationRequirement>
        <knowledgeRequirement>
            <requiredKnowledge href="_bkm_001"/>
        </knowledgeRequirement>

This case is currently working as expected.

The spec 12.3.2 References within the DMN XSD states that is it possible to refer to external nodes using the following syntax:

        <informationRequirement>
            <requiredDecision href="http://www.montera.com.au/spec/DMN/0091-local-hrefs#_decision_001"/>
        </informationRequirement>
        <informationRequirement>
            <requiredInput href="http://www.montera.com.au/spec/DMN/0091-local-hrefs#_input_001"/>
        </informationRequirement>
        <knowledgeRequirement>
            <requiredKnowledge href="http://www.montera.com.au/spec/DMN/0091-local-hrefs#_bkm_001"/>
        </knowledgeRequirement>

This case is currently NOT working

@yesamer yesamer added type:bug Something is behaving unexpectedly area:dmn Related to DMN area:engine Related to the runtime engines labels Jul 31, 2024
@gitgabrio gitgabrio moved this from 📋 Backlog to ⏳ In Progress in 🦉 KIE Podling Board Aug 6, 2024
@gitgabrio
Copy link

gitgabrio commented Aug 6, 2024

@yesamer
IIUC, this is the test/model you are referring to, but the namespace in the href attribute
href="http://www.montera.com.au/spec/DMN/0091-local-hrefs#_decision_001"
is the namespace of the model itself

<definitions namespace="http://www.montera.com.au/spec/DMN/0091-local-hrefs"
so it is not a reference to an external node
(pls notice there are some tests/examples using such elements from external nodes, e.g. this)

@yesamer
Copy link
Author

yesamer commented Aug 6, 2024

@gitgabrio Yes, that particular case refers to the same document. BUT, according to the specs ^^ (12.3.2 References within the DMN XSD) it should work with external nodes too. Is it correct or did I misunderstand the specs?

@yesamer
Copy link
Author

yesamer commented Aug 6, 2024

@gitgabrio So that means it's not working in the case the namespace points to itself, is that right?

@gitgabrio
Copy link

@yesamer
When the engine find that syntax
http://www.montera.com.au/spec/DMN/0091-local-hrefs#_decision_001
it tries to resolve the node looking in the imports with the http://www.montera.com.au/spec/DMN/0091-local-hrefs namespace.
But since there are not such imports, it fails.

Yes, that particular case refers to the same document. BUT, according to the specs ^^ (12.3.2 References within the DMN XSD) it should work with external nodes too. Is it correct or did I misunderstand the specs?
yup, and it actually works with real external nodes (e.g. this)

So that means it's not working in the case the namespace points to itself, is that right?
Yup. IIUC the specs, the test is wrong, because the specs refer to external nodes, and this is not the case.

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:bug Something is behaving unexpectedly
Projects
Status: 🎯 Done
2 participants