Skip to content

Commit

Permalink
kie-issues#1014: KIE Sandbox: Enabling Validation for DMN Assets up t…
Browse files Browse the repository at this point in the history
…o 1.5 (#2200)
  • Loading branch information
yesamer authored Mar 16, 2024
1 parent 013f7f7 commit ba5de57
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions packages/online-editor/src/editor/Validation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,22 @@ export function useFileValidation(

const decodedFileContent = decoder.decode(fileContent);
const dmnSpecVersion = dmnLanguageService?.getSpecVersion(decodedFileContent);
if (!dmnSpecVersion || (dmnSpecVersion !== "1.0" && dmnSpecVersion !== "1.1" && dmnSpecVersion !== "1.2")) {
if (
!dmnSpecVersion ||
(dmnSpecVersion !== "1.0" &&
dmnSpecVersion !== "1.1" &&
dmnSpecVersion !== "1.2" &&
dmnSpecVersion !== "1.3" &&
dmnSpecVersion !== "1.4" &&
dmnSpecVersion !== "1.5")
) {
setNotifications(i18n.terms.validation, "", [
{
type: "ALERT",
normalizedPosixPathRelativeToTheWorkspaceRoot: "",
severity: "WARNING",
message:
"Validation checks are temporarily supported only on DMN 1.2 or below. For full access to this feature, use the Legacy DMN Editor.",
"Validation doesn't support this DMN version" + dmnSpecVersion ? "(" + dmnSpecVersion + ")" : "",
},
]);
return;
Expand Down

0 comments on commit ba5de57

Please sign in to comment.