0

I am using VSCode to design DMN files. Sometimes when I try to read a file, it simply displays the message:

Editor content has not been set.

Something went wrong. An attempt has been made to view the editor before content is set.

Is there any way to find the error message that was actually produced when reading the file? Usually the exception that is thrown has a much better description about what is missing or wrong with the file. I have searched for log files produced by VSCode but I can't find any with this or any related error in it.

AgilePro
  • 5,588
  • 4
  • 33
  • 56
  • Most likely, that message means that the DMN asset is invalid and can't be unmarshalled, but It's very hard to give an answer without the reproducer. Can you please share the DMN asset? My suggestion is to contact the KIE team here https://kie.zulipchat.com/ attaching your reproducer for a detailed analysis. – Yeser Amer Dec 28 '22 at 08:34

1 Answers1

0

There are three possible reasons to explain the above error.

  1. Your DMN file is invalid (eg. a XML tag is wrong or the schema hierarchy is broken)
  2. Your DMN file version is not supported by the editor. Currently, the editor supports up to DMN version 1.3
  3. An unexpected error occurred. In that case, the analysis of your file is the only way to determine the root cause.

The next version of the extension (0.27.0), will show an additional message reporting the root cause of the issue.

enter image description here

Yeser Amer
  • 111
  • 1
  • 10
  • No, neither. Verified valid XML. I actually can load the file into drools and use it to make decisions. Clearly there is an incompatibility between the implementation in VSCode and in DROOLS, and that is possibly to be expected. But why not just display the actual exception that was thrown? Maybe a stack trace? Here is hoping the next version is better. I will see if I can dig up that file and attach it. – AgilePro Jan 19 '23 at 06:24
  • @AgilePro Ok, then we need to analyze your DMN file. Can you please open an issue here https://github.com/kiegroup/kie-tools/issues attaching your reproducer? Please remove any sensitive data :) And yes, next version will show the root cause in the editor and the complete stack trace in the console. Thank you. – Yeser Amer Jan 19 '23 at 08:56
  • Take any valid DMN. Edit the file and change a "decision" tag to "decisionx". This is of course an error in the file. See if the error displays. I reproduced that just now. The XML parser will certainly thrown an exception, and displaying that exception is probably sufficient. – AgilePro Jan 25 '23 at 18:03
  • 1
    @AgilePro as I said, the new version now shows the exception message in both UI and console. You can test that [here](https://sandbox.kie.org/) – Yeser Amer Mar 22 '23 at 08:50
  • i will be looking for that when it gets into the marketplace. Don't see it yet – AgilePro Mar 30 '23 at 19:50