tck
tck copied to clipboard
Debatable / incorrect test case CL3 / 0089-nested-inputdata-imports
I believe the test case below is incorrect - same variable associated to 'Person name' InputData is bound to two different values.
<testCase id="001" invocableName="Evaluation DS" type="decision">
<description>Nested imports of InputData following GITHUB DMN TCK 274</description>
<inputNode name="Model B">
<component name="modelA">
<component name="Person name">
<value xsi:type="xsd:string">B.A.John</value>
</component>
</component>
</inputNode>
<inputNode name="Model B2">
<component name="modelA">
<component name="Person name">
<value xsi:type="xsd:string">B2.A.John2</value>
</component>
</component>
</inputNode>
Here is my rationale based on what I found so far in Chapter 6 & 7.
- InputDatas are uniquely identified by the namespace of the model in which they are defined and their name (unique in the model that defines it).
- Each InputData has one one variable associated with (see metamodel and Chapter 7)
- A variable is bound at runtime to a value.
- When same InputData is imported multiple times, the definition & variable are resolved by navigating the models, starting from the root model and using the importNames. Hence the imports reference the same variable.
I am not aware of any PL or DSL that allows one variable to be bound to more than one value in the same runtime context. This is the rationale behind #ifdef macros in C/C++.