0

I was using Drools Business central and whenever I use to modify DMN file , used to leverage validate option to check the DMN . Since Drools 8 , Business central is retired so I started leveraging VS Code plugins , I am unable to find an option to validate DMN . Hence until I don't run DMN I don't know what is the problem . I am using DMN Editor plugin v0.26.0 , VSCode v1.66 and kogito bundle plugin v0.28.2 .

I didnt find any options to validate on VSCode editor .

1 Answers1

0

Since Drools v7, we have offered the kie-dmn-validation module. This is the validation capability you are likely referring to as using from Business Central, you can use the standard wiring we provide for this capability as out-of-the-box, or you can roll your own usage.

In Drools v7 and v8, when your project is a KJAR, the kie-maven-plugin will ensure the DMN validation is performed; after ensuring you are using standard KJAR project (such as those from BC) as explained in the Drools manual, you can tune the validation options of the maven plugin with:

You likely want to ensure the VS Code IDE instance you are using is leveraging the Maven build, so that the kie-maven-plugin will be used per details linked above.

Finally, if you are using the KIE Sandbox, the validation is part of the KIE Extended Services running locally.

tarilabs
  • 2,178
  • 2
  • 15
  • 23
  • I should also add the validation goes beyond syntax to semantic validation. Fun fact: semantic rules are defined in DRL for the curious – tarilabs May 24 '23 at 18:19
  • I have a faulty DMN ( one of the Literal FEEL expression syntax is incorrect , but it still adheres to DMN schema ) . If i import this DMN to Business central instance , it immediately validates the syntax of literal expression and shows the problems in Error window . While if i use maven plugin and compile the project which has this schema ,it doesnt complain . My question is - how can i achieve that without using Business central as it is retired effective version 8 . – Monika Singhal Jun 01 '23 at 13:22
  • sample DMN section below : if (true) then { reasonCdTmp: if(Domain1.attr1="0000" then "0001" else "0002" result: {"reasonCode":reasonCdTmp,"sum":calcSum()} }.result – Monika Singhal Jun 01 '23 at 13:26
  • about: > "_While if i use maven plugin and compile the project which has this schema ,it doesnt complain_" sounds like a misconfiguration of the maven project on your end; consider sharing a reproducer on the drools community forums so to take a look with more details – tarilabs Jun 01 '23 at 15:06