tck icon indicating copy to clipboard operation
tck copied to clipboard

Debatable / incorrect test case CL3 / 0089-nested-inputdata-imports

Open opatrascoiu opened this issue 3 years ago • 7 comments

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.

  1. 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).
  2. Each InputData has one one variable associated with (see metamodel and Chapter 7)
  3. A variable is bound at runtime to a value.
  4. 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++.

opatrascoiu avatar Mar 23 '21 11:03 opatrascoiu