philipdnichols opened a new issue, #3193:
URL: https://github.com/apache/incubator-kie-tools/issues/3193

   Hi folks, me again :)
   
   My team stumbled on this issue recently, basically have a BKM which outputs 
a context which outputs a decision table containing one output column and 
validate this DMN through the KIE validator and we run into this validation 
error message:
   
   ```
   The listed type reference could not be resolved - Message [id=0, 
level=ERROR, path=null, line=24, column=-1 text=DMN: Unknown output type for 
decision table on node 'MyBKM' (DMN id: _159C951D-5144-4891-B9BA-685D49D08F00, 
The listed type reference could not be resolved) ]
   ```
   
   I did a bit of digging into the DMN XML and the Drools code and the error 
appears to be coming from `DMNEvaluatorCompiler::recurseUpToInferTypeRef` - it 
looks like this code doesn't handle the case where a `recursiveIdx.getParent(`) 
is of type `TFunctionDefinition`. Oddly, the code seems to handle the 
`instanceof BusinessKnowledgeModel` and a `BusinessKnowledgeModel` has a 
reference to the function definition.
   
   In addition, it looks like the editor might be taking some liberties in how 
it handles setting up the `output` and `decisiontable` XML elements when the 
decision table output is a single column (namely that the `name` and `typeRef` 
attributes are added to the `decisiontable` element and not to the `output` 
element).
   
   However, all this is just speculation on my part in terms of how it 
works/should work. We did notice however that a DMN using a BKM setup this way 
evaluates perfectly fine, and if, for example, you manually add the `typeRef` 
property to the `output` element of the decision table, the validation error 
goes away as well.
   
   Attaching a screenshot of the BKM setup and the DMN itself here:
   
   
![Image](https://github.com/user-attachments/assets/63a9fab6-2021-4923-8f0c-cbaaee80d934)
   
   
[phil-context-stuff.zip](https://github.com/user-attachments/files/21024924/phil-context-stuff.zip)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to