diff --git a/kie-dmn/kie-dmn-core/src/test/java/org/kie/dmn/core/DMNCompilerTest.java b/kie-dmn/kie-dmn-core/src/test/java/org/kie/dmn/core/DMNCompilerTest.java
index 9f9617c56ac..c52ba8da6d5 100644
--- a/kie-dmn/kie-dmn-core/src/test/java/org/kie/dmn/core/DMNCompilerTest.java
+++ b/kie-dmn/kie-dmn-core/src/test/java/org/kie/dmn/core/DMNCompilerTest.java
@@ -274,9 +274,9 @@ public void testImport() {
@Test
public void testEmptyNamedModelImport() {
- final DMNRuntime runtime = createRuntimeWithAdditionalResources("Importing_EmptyNamed_Model.dmn",
+ final DMNRuntime runtime = createRuntimeWithAdditionalResources("valid_models/DMNv1_5/Importing_EmptyNamed_Model.dmn",
this.getClass(),
- "Imported_Model_Unamed.dmn");
+ "valid_models/DMNv1_5/Imported_Model_Unamed.dmn");
final DMNModel importedModel = runtime.getModel("http://www.trisotech.com/dmn/definitions/_f27bb64b-6fc7-4e1f-9848-11ba35e0df44",
"Imported Model");
@@ -320,9 +320,9 @@ public void testEmptyNamedModelImport() {
@Test
public void testOverridingEmptyNamedModelImport() {
- final DMNRuntime runtime = createRuntimeWithAdditionalResources("Importing_OverridingEmptyNamed_Model.dmn",
+ final DMNRuntime runtime = createRuntimeWithAdditionalResources("valid_models/DMNv1_5/Importing_OverridingEmptyNamed_Model.dmn",
this.getClass(),
- "Imported_Model_Unamed.dmn");
+ "valid_models/DMNv1_5/Imported_Model_Unamed.dmn");
final DMNModel importedModel = runtime.getModel("http://www.trisotech.com/dmn/definitions/_f27bb64b-6fc7-4e1f-9848-11ba35e0df44",
"Imported Model");
diff --git a/kie-dmn/kie-dmn-core/src/test/java/org/kie/dmn/core/DMNInputRuntimeTest.java b/kie-dmn/kie-dmn-core/src/test/java/org/kie/dmn/core/DMNInputRuntimeTest.java
index d264e6b8ee6..b9bfcf98d95 100644
--- a/kie-dmn/kie-dmn-core/src/test/java/org/kie/dmn/core/DMNInputRuntimeTest.java
+++ b/kie-dmn/kie-dmn-core/src/test/java/org/kie/dmn/core/DMNInputRuntimeTest.java
@@ -291,7 +291,7 @@ public void testAllowedValuesChecksInsideCollectionElement() {
@Test
public void testAllowedValuesChecksInsideCollection() {
- final DMNRuntime runtime = DMNRuntimeUtil.createRuntime( "AllowedValuesChecksInsideCollection.dmn", this.getClass() );
+ final DMNRuntime runtime = DMNRuntimeUtil.createRuntime("valid_models/DMNv1_5/AllowedValuesChecksInsideCollection.dmn", this.getClass() );
final DMNModel dmnModel = runtime.getModel(
"http://www.trisotech.com/definitions/_238bd96d-47cd-4746-831b-504f3e77b442",
"AllowedValuesChecksInsideCollection" );
@@ -325,7 +325,7 @@ public void testAllowedValuesChecksInsideCollection() {
@Test
public void testTypeConstraintsChecks() {
- final DMNRuntime runtime = DMNRuntimeUtil.createRuntime( "TypeConstraintsChecks.dmn", this.getClass() );
+ final DMNRuntime runtime = DMNRuntimeUtil.createRuntime("valid_models/DMNv1_5/TypeConstraintsChecks.dmn", this.getClass() );
final DMNModel dmnModel = runtime.getModel(
"http://www.trisotech.com/definitions/_238bd96d-47cd-4746-831b-504f3e77b442",
"TypeConstraintsChecks" );
diff --git a/kie-dmn/kie-dmn-core/src/test/java/org/kie/dmn/core/DMNRuntimeTest.java b/kie-dmn/kie-dmn-core/src/test/java/org/kie/dmn/core/DMNRuntimeTest.java
index a5198f90a2d..4ea5f5acc85 100644
--- a/kie-dmn/kie-dmn-core/src/test/java/org/kie/dmn/core/DMNRuntimeTest.java
+++ b/kie-dmn/kie-dmn-core/src/test/java/org/kie/dmn/core/DMNRuntimeTest.java
@@ -25,7 +25,6 @@
import java.time.LocalTime;
import java.time.OffsetTime;
import java.time.Period;
-import java.time.ZoneId;
import java.time.ZoneOffset;
import java.time.ZonedDateTime;
import java.time.chrono.ChronoPeriod;
@@ -662,7 +661,7 @@ public void testDateAndTime() {
@Test
public void testDateToDateTimeFunction() {
- final DMNRuntime runtime = DMNRuntimeUtil.createRuntime("DateToDateTimeFunction.dmn", this.getClass());
+ final DMNRuntime runtime = DMNRuntimeUtil.createRuntime("valid_models/DMNv1_5/DateToDateTimeFunction.dmn", this.getClass());
final DMNModel dmnModel = runtime.getModel("https://kiegroup.org/dmn/_A7F17D7B-F0AB-4C0B-B521-02EA26C2FBEE",
"new-file");
assertThat(dmnModel).isNotNull();
diff --git a/kie-dmn/kie-dmn-core/src/test/java/org/kie/dmn/core/compiler/UnnamedImportUtilsTest.java b/kie-dmn/kie-dmn-core/src/test/java/org/kie/dmn/core/compiler/UnnamedImportUtilsTest.java
index 24911180d0c..e4e9309a970 100644
--- a/kie-dmn/kie-dmn-core/src/test/java/org/kie/dmn/core/compiler/UnnamedImportUtilsTest.java
+++ b/kie-dmn/kie-dmn-core/src/test/java/org/kie/dmn/core/compiler/UnnamedImportUtilsTest.java
@@ -27,10 +27,10 @@ public class UnnamedImportUtilsTest {
@Test
public void isInUnnamedImportTrue() {
- final DMNRuntime runtime = DMNRuntimeUtil.createRuntimeWithAdditionalResources("Importing_EmptyNamed_Model" +
+ final DMNRuntime runtime = DMNRuntimeUtil.createRuntimeWithAdditionalResources("valid_models/DMNv1_5/Importing_EmptyNamed_Model" +
".dmn",
this.getClass(),
- "Imported_Model_Unamed.dmn");
+ "valid_models/DMNv1_5/Imported_Model_Unamed.dmn");
final DMNModel importedModel = runtime.getModel("http://www.trisotech.com/dmn/definitions/_f27bb64b-6fc7-4e1f-9848-11ba35e0df44",
"Imported Model");
@@ -47,9 +47,9 @@ public void isInUnnamedImportTrue() {
@Test
public void isInUnnamedImportFalse() {
- final DMNRuntime runtime = DMNRuntimeUtil.createRuntimeWithAdditionalResources("Importing_Named_Model.dmn",
+ final DMNRuntime runtime = DMNRuntimeUtil.createRuntimeWithAdditionalResources("valid_models/DMNv1_5/Importing_Named_Model.dmn",
this.getClass(),
- "Imported_Model_Unamed.dmn");
+ "valid_models/DMNv1_5/Imported_Model_Unamed.dmn");
final DMNModel importedModel = runtime.getModel("http://www.trisotech.com/dmn/definitions/_f27bb64b-6fc7-4e1f-9848-11ba35e0df44",
"Imported Model");
@@ -67,7 +67,7 @@ public void isInUnnamedImportFalse() {
@Test
public void addIfNotPresentTrue() throws IOException {
URL importedModelFileResource = Thread.currentThread().getContextClassLoader().getResource(
- "Imported_Model_Unamed.dmn");
+ "valid_models/DMNv1_5/Imported_Model_Unamed.dmn");
assertNotNull(importedModelFileResource);
try (InputStream is = importedModelFileResource.openStream()) {
String xml = new String(is.readAllBytes(), StandardCharsets.UTF_8);
@@ -82,16 +82,16 @@ public void addIfNotPresentTrue() throws IOException {
@Test
public void addIfNotPresentFalse() throws IOException {
- final DMNRuntime runtime = DMNRuntimeUtil.createRuntimeWithAdditionalResources("Importing_EmptyNamed_Model.dmn",
+ final DMNRuntime runtime = DMNRuntimeUtil.createRuntimeWithAdditionalResources("valid_models/DMNv1_5/Importing_EmptyNamed_Model.dmn",
this.getClass(),
- "Imported_Model_Unamed.dmn");
+ "valid_models/DMNv1_5/Imported_Model_Unamed.dmn");
final DMNModelImpl importingModel = (DMNModelImpl)runtime.getModel("http://www.trisotech.com/dmn/definitions/_f79aa7a4-f9a3-410a-ac95-bea496edabgc",
"Importing empty-named Model");
assertThat(importingModel).isNotNull();
Definitions importingDefinitions = importingModel.getDefinitions();
URL importedModelFileResource = Thread.currentThread().getContextClassLoader().getResource(
- "Imported_Model_Unamed.dmn");
+ "valid_models/DMNv1_5/Imported_Model_Unamed.dmn");
assertNotNull(importedModelFileResource);
try (InputStream is = importedModelFileResource.openStream()) {
String importedXml = new String(is.readAllBytes(), StandardCharsets.UTF_8);
diff --git a/kie-dmn/kie-dmn-test-resources/Readme.md b/kie-dmn/kie-dmn-test-resources/Readme.md
new file mode 100644
index 00000000000..1cf43969ba2
--- /dev/null
+++ b/kie-dmn/kie-dmn-test-resources/Readme.md
@@ -0,0 +1,26 @@
+DMN Test Resources
+==================
+
+This module is meant to be the ultimate single-source-of truth about DMN models used for testing purposes.
+
+The models are stored under `src/test/resources`, so the module has to be imported has
+
+```xml
+
+ org.kie
+ kie-dmn-test-resources
+ tests
+ test
+
+```
+
+to have them available.
+
+Models are split in two categories: _valid_models_ and __invalid_models_.
+The former are valid models, expected to succeed the DMN validation.
+The latter are invalid ones, expected to have some errors, and used to check that such errors are detected by validation.
+
+For both categories, there is a subdivision: _DMNv1_x_ and _DMNV1_5_.
+The former are all the models created before the 1.5 implementation, that are hard to sort based on the version relates to.
+The latter contains models with 1.5. specific feature.
+In the future, for each new DMN release there will be a specific folder.
\ No newline at end of file
diff --git a/kie-dmn/kie-dmn-test-resources/src/test/resources/invalid_models/DMNv1_x/loan_withOverlap.dmn b/kie-dmn/kie-dmn-test-resources/src/test/resources/invalid_models/DMNv1_x/loan_withOverlap.dmn
new file mode 100644
index 00000000000..3178977c530
--- /dev/null
+++ b/kie-dmn/kie-dmn-test-resources/src/test/resources/invalid_models/DMNv1_x/loan_withOverlap.dmn
@@ -0,0 +1,181 @@
+
+
+
+
+ number
+
+
+ number
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Credit score
+
+
+
+
+ DTI
+
+
+
+
+
+
+ <700
+
+
+ <=.28
+
+
+ true
+
+
+
+
+
+
+
+ >=700
+
+
+ -
+
+
+ true
+
+
+
+
+
+
+
+ <700
+
+
+ >=.28
+
+
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (Loan.amount / Loan.years)/Salary
+
+
+
+
+
+
+
+ 50
+ 100
+ 100
+ 100
+ 100
+
+
+ 300
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/kie-dmn/kie-dmn-test-resources/src/test/resources/invalid_models/DMNv1_x/multiple/Chapter 11 Example.dmn b/kie-dmn/kie-dmn-test-resources/src/test/resources/invalid_models/DMNv1_x/multiple/Chapter 11 Example.dmn
new file mode 100644
index 00000000000..e6a0b89e984
--- /dev/null
+++ b/kie-dmn/kie-dmn-test-resources/src/test/resources/invalid_models/DMNv1_x/multiple/Chapter 11 Example.dmn
@@ -0,0 +1,3015 @@
+
+
+
+
+
+
+
+
+
+
+
+ string
+
+ "DECLINE","BUREAU","THROUGH"
+
+
+
+ string
+
+ "INELIGIBLE","ELIGIBLE"
+
+
+
+ string
+
+ "FULL","MINI","NONE"
+
+
+
+ string
+
+ "DECLINE","HIGH","MEDIUM","LOW","VERY LOW"
+
+
+
+
+ number
+
+
+ string
+
+ "S","M"
+
+
+
+ string
+
+ "EMPLOYED","SELF-EMPLOYED","STUDENT","UNEMPLOYED"
+
+
+
+ boolean
+
+
+
+ number
+
+
+ number
+
+
+ number
+
+
+
+
+
+ boolean
+
+
+ number
+
+ [0..999], null
+
+
+
+
+ string
+
+ "DECLINE","REFER","ACCEPT"
+
+
+
+
+ string
+
+ "STANDARD LOAN","SPECIAL LOAN"
+
+
+
+ number
+
+
+ number
+
+
+ number
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <p><span lang="JA">Determine if an application requiring adjudication should be accepted or declined given the available application data and supporting documents.</span></p>
+ Should this application that has been referred for adjudication be accepted?
+ Yes/No
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <p>The collected wisdom of the credit officers as collected in their best practice wiki.</p>
+ Expertise
+
+
+
+ <p>Documents associated with a loan that are not processed electronically but are available for manual adjudication.</p>
+
+
+
+ <p><span style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"><span lang="JA">The </span><strong><span lang="JA">Bureau call type </span></strong><span lang="JA">decision logic invokes the Bureau call type </span>table, passing the output of the Pre-bureau risk category decision as the Pre-Bureau Risk Category parameter.</span></p>
+ How much data should be requested from the credit bureau for this application?
+ A value from the explicit list "Full", "Mini", "None"
+
+
+
+
+
+
+
+
+
+
+
+ Bureau call type table
+
+
+
+
+ Pre-bureau risk category
+
+
+
+
+
+ <p><span style="font-size: 10pt; font-family: arial, helvetica, sans-serif;"><span lang="JA">The </span><strong><span lang="JA">Strategy </span></strong><span lang="JA">decision logic defines a complete, unique-hit decision table deriving Strategy from </span>Eligibility and Bureau call type.</span></p>
+ What is the appropriate handling strategy for this application?
+ A value from the explicit list "Decline", "Bureau", "Through"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Eligibility
+
+
+ "INELIGIBLE","ELIGIBLE"
+
+
+
+
+ Bureau call type
+
+
+ "FULL","MINI","NONE"
+
+
+
+
+ "DECLINE","BUREAU","THROUGH"
+
+
+
+
+
+ "INELIGIBLE"
+
+
+ -
+
+
+ "DECLINE"
+
+
+
+
+
+
+
+ "ELIGIBLE"
+
+
+ "FULL", "MINI"
+
+
+ "BUREAU"
+
+
+
+
+
+
+
+ "ELIGIBLE"
+
+
+ "NONE"
+
+
+ "THROUGH"
+
+
+
+
+
+
+
+
+ <p><span style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"><span lang="JA">The </span><strong><span lang="JA">Eligibility </span></strong><span lang="JA">decision logic invokes the Eligibility rules business </span>knowledge model, passing Applicant data.Age as the Age parameter, the output of the Pre-bureau risk category decision as the Pre-Bureau Risk Category parameter, and the output of the Pre-bureau affordability decision as the Pre-Bureau Affordability parameter.</span></p>
+ Does this applicant appear eligible for the loan they applied for given only their application data?
+ Value from the explicit list "Eligible", "Not Eligible"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Eligibility rules
+
+
+
+
+ Applicant data.Age
+
+
+
+
+
+ Pre-bureau risk category
+
+
+
+
+
+ Pre-bureau affordability
+
+
+
+
+
+ <p><span style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"><span lang="JA">The </span><strong><span lang="JA">Eligibility rules </span></strong><span lang="JA">decision logic defines a complete, priority-ordered single hit decision table </span>deriving Eligibility from Pre-Bureau Risk Category, Pre-Bureau Affordability and Age.</span></p>
+
+
+
+
+
+
+
+
+ Pre-Bureau Risk Category
+
+
+ "DECLINE","HIGH","MEDIUM","LOW","VERY LOW"
+
+
+
+
+ Pre-Bureau Affordability
+
+
+
+
+ Age
+
+
+
+
+ "INELIGIBLE","ELIGIBLE"
+
+
+
+
+
+ "DECLINE"
+
+
+ -
+
+
+ -
+
+
+ "INELIGIBLE"
+
+
+
+
+
+
+
+ -
+
+
+ false
+
+
+ -
+
+
+ "INELIGIBLE"
+
+
+
+
+
+
+
+ -
+
+
+ -
+
+
+ < 18
+
+
+ "INELIGIBLE"
+
+
+
+
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ "ELIGIBLE"
+
+
+
+
+
+
+
+
+
+
+
+
+ <p>Definitions of the products, their cost structure and eligibility criteria.</p>
+ Policy
+
+
+
+ <p><span style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"><span lang="JA">The </span><strong><span lang="JA">Routing Rules </span></strong><span lang="JA">decision logic defines a complete, priority-ordered single hit decision table </span>deriving Routing from Post-Bureau Risk Category, Post-Bureau Affordability, Bankrupt and Credit Score.</span></p>
+
+
+
+
+
+
+
+
+
+ Post-bureau risk category
+
+
+ "DECLINE","HIGH","MEDIUM","LOW","VERY LOW"
+
+
+
+
+ Post-bureau affordability
+
+
+
+
+ Bankrupt
+
+
+
+
+ Credit score
+
+
+ null, [0..999]
+
+
+
+
+ "DECLINE","REFER","ACCEPT"
+
+
+
+
+
+ -
+
+
+ false
+
+
+ -
+
+
+ -
+
+
+ "DECLINE"
+
+
+
+
+
+
+
+ -
+
+
+ -
+
+
+ true
+
+
+ -
+
+
+ "DECLINE"
+
+
+
+
+
+
+
+ "HIGH"
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ "REFER"
+
+
+
+
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ < 580
+
+
+ "REFER"
+
+
+
+
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ "ACCEPT"
+
+
+
+
+
+
+
+
+
+
+
+
+ <p><span style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"><span lang="JA">The </span><strong><span lang="JA">Routing </span></strong><span lang="JA">decision logic invokes the Routing rules business </span>knowledge model, passing Bureau data . Bankrupt as the Bankrupt parameter, Bureau data . CreditScore as the Credit Score parameter, the output of the Post-bureau risk category decision as the Post-Bureau Risk Category parameter, and the output of the Post-bureau affordability decision as the Post-Bureau Affordability parameter. Note that if Bureau data is null (due to the THROUGH strategy bypassing the Collect bureau data task) the Bankrupt and Credit Score parameters will be null.</span></p>
+ How this should this applicant be routed given all available data?
+ A value from the explicit list "Decline", "Refer for Adjudication", "Accept without Review"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Routing rules
+
+
+
+
+ Bureau data.Bankrupt
+
+
+
+
+
+ Bureau data.CreditScore
+
+
+
+
+
+ Post-bureau risk category
+
+
+
+
+
+ Post-bureau affordability
+
+
+
+
+
+ <p><span style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"><span lang="JA">The </span><strong><span lang="JA">Bureau call type table </span></strong><span lang="JA">decision logic defines a complete, unique-hit decision table deriving </span>Bureau Call Type from Pre-Bureau Risk Category.</span></p>
+
+
+
+
+
+
+ Pre-Bureau Risk Category
+
+
+ "DECLINE","HIGH","MEDIUM","LOW","VERY LOW"
+
+
+
+
+ "FULL","MINI","NONE"
+
+
+
+
+
+ "HIGH", "MEDIUM"
+
+
+ "FULL"
+
+
+
+
+
+
+
+ "LOW"
+
+
+ "MINI"
+
+
+
+
+
+
+
+ "VERY LOW", "DECLINE"
+
+
+ "NONE"
+
+
+
+
+
+
+
+
+
+
+
+
+ <p>Overall risk management approach for the financial institution including its approach to application risk, credit contingencies and credit risk scoring.</p>
+ Policy
+
+
+
+ <p><span style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"></span><span lang="JA">The </span><strong><span lang="JA">Credit contingency factor table </span></strong><span lang="JA"><span style="font-size: 10pt; font-family: arial, helvetica, sans-serif;">decision</span> logic defines a complete, unique-hit decision table </span>deriving Credit contingency factor from Risk Category.</p>
+<p> </p>
+
+
+
+
+
+
+ Risk Category
+
+
+ "DECLINE","HIGH","MEDIUM","LOW","VERY LOW"
+
+
+
+
+
+
+ "HIGH", "DECLINE"
+
+
+ 0.6
+
+
+
+
+
+
+
+ "MEDIUM"
+
+
+ 0.7
+
+
+
+
+
+
+
+ "LOW", "VERY LOW"
+
+
+ 0.8
+
+
+
+
+
+
+
+
+
+
+
+
+ <p>Internal spreadsheet showing the relationship of income, payments, expenses, risk and affordability.</p>
+ Policy
+
+
+
+ <p><span style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"><span lang="JA">The </span><strong><span lang="JA">Affordability calculation </span></strong><span lang="JA">decision logic defines a boxed function deriving Affordability from </span>Monthly Income, Monthly Repayments, Monthly Expenses and Required Monthly Installment. One step in this calculation derives Credit contingency factor by invoking the Credit contingency factor table business</span></p>
+
+
+
+
+
+
+
+
+
+
+
+ Monthly Income - (Monthly Repayments + Monthly Expenses)
+
+
+
+
+
+
+ Credit contingency factor table
+
+
+
+
+ Risk Category
+
+
+
+
+
+
+
+ if Disposable Income * Credit Contingency Factor > Required Monthly Installment
+then true
+else false
+
+
+
+
+ Affordability
+
+
+
+
+
+
+
+
+
+
+
+
+ <p><span style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"><span lang="JA">The </span><strong><span lang="JA">Pre-bureau affordability </span></strong><span lang="JA">decision logic invokes the </span>Affordability calculation business knowledge model, passing Applicant data.Monthly.Income as the Monthly Income parameter, Applicant data.Monthly.Repayments as the Monthly Repayments parameter, Applicant data.Monthly.Expenses as the Monthly Expenses parameter, the output of the Pre-bureau risk category decision as the Risk Category parameter, and the output of the Required monthly installment decision as the Required Monthly Installment parameter.</span></p>
+ Can the applicant afford the loan they applied for given only their application data?
+ Yes/No
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Affordability calculation
+
+
+
+
+ Applicant data.Monthly.Income
+
+
+
+
+
+ Applicant data.Monthly.Repayments
+
+
+
+
+
+ Applicant data.Monthly.Expenses
+
+
+
+
+
+ Pre-bureau risk category
+
+
+
+
+
+ Required monthly installment
+
+
+
+
+
+ <p><span style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"><span lang="JA">The </span><strong><span lang="JA">Post-bureau affordability </span></strong><span lang="JA">decision logic invokes the </span>Affordability calculation business knowledge model, passing Applicant data.Monthly.Income as the Monthly Income parameter, Applicant data.Monthly.Repayments as the Monthly Repayments parameter, Applicant data.Monthly.Expenses as the Monthly Expenses parameter, the output of the Post-bureau risk category decision as the Risk Category parameter, and the output of the Required monthly installment decision as the Required Monthly Installment parameter.</span></p>
+ Can the applicant afford the loan they applied for given all available data?
+ Yes/No
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Affordability calculation
+
+
+
+
+ Applicant data.Monthly.Income
+
+
+
+
+
+ Applicant data.Monthly.Repayments
+
+
+
+
+
+ Applicant data.Monthly.Expenses
+
+
+
+
+
+ Post-bureau risk category
+
+
+
+
+
+ Required monthly installment
+
+
+
+
+
+ <p><span style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"><span lang="JA">The </span><strong><span lang="JA">Post-bureau risk category </span></strong><span lang="JA">decision logic invokes the Post-bureau </span>risk category business knowledge model, passing Applicant data.ExistingCustomer as the Existing Customer parameter, Bureau data.CreditScore as the Credit Score parameter, and the output of the Application risk score decision as the Application Risk Score parameter. Note that if Bureau data is null (due to the THROUGH strategy bypassing the Collect bureau data task) the Credit Score parameter will be null.</span></p>
+ Which risk category is most appropriate for this applicant given all available data?
+ A value from the explicit list "Decline", "High Risk", "Medium Risk", "Low Risk", "Very Low Risk"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Post-bureau risk category table
+
+
+
+
+ Applicant data.ExistingCustomer
+
+
+
+
+
+ Bureau data.CreditScore
+
+
+
+
+
+ Application risk score
+
+
+
+
+
+ <p>External credit score and bankruptcy information provided by a bureau.</p>
+
+
+
+ <p><span style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"><span lang="JA">The </span><strong><span lang="JA">Post-bureau risk category table </span></strong><span lang="JA">decision logic defines a complete, unique-hit decision table </span>deriving Post-Bureau Risk Category from Existing Customer, Application Risk Score and Credit Score.</span></p>
+
+
+
+
+
+
+
+
+ Existing Customer
+
+
+
+
+ Application Risk Score
+
+
+
+
+ Credit Score
+
+
+
+
+ "DECLINE","HIGH","MEDIUM","LOW","VERY LOW"
+
+
+
+
+
+ false
+
+
+ < 120
+
+
+ < 590
+
+
+ "HIGH"
+
+
+
+
+
+
+
+ false
+
+
+ < 120
+
+
+ [590..610]
+
+
+ "MEDIUM"
+
+
+
+
+
+
+
+ false
+
+
+ < 120
+
+
+ > 610
+
+
+ "LOW"
+
+
+
+
+
+
+
+ false
+
+
+ [120..130]
+
+
+ < 600
+
+
+ "HIGH"
+
+
+
+
+
+
+
+ false
+
+
+ [120..130]
+
+
+ [600..625]
+
+
+ "MEDIUM"
+
+
+
+
+
+
+
+ false
+
+
+ [120..130]
+
+
+ > 625
+
+
+ "LOW"
+
+
+
+
+
+
+
+ false
+
+
+ > 130
+
+
+ -
+
+
+ "VERY LOW"
+
+
+
+
+
+
+
+ true
+
+
+ <= 100
+
+
+ < 580
+
+
+ "HIGH"
+
+
+
+
+
+
+
+ true
+
+
+ <= 100
+
+
+ [580..600]
+
+
+ "MEDIUM"
+
+
+
+
+
+
+
+ true
+
+
+ <= 100
+
+
+ > 600
+
+
+ "LOW"
+
+
+
+
+
+
+
+ true
+
+
+ > 100
+
+
+ < 590
+
+
+ "HIGH"
+
+
+
+
+
+
+
+ true
+
+
+ > 100
+
+
+ [590..615]
+
+
+ "MEDIUM"
+
+
+
+
+
+
+
+ true
+
+
+ > 100
+
+
+ > 615
+
+
+ "LOW"
+
+
+
+
+
+
+
+
+
+
+
+
+ <p><span style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"><span lang="JA">The </span><strong><span lang="JA">Pre-Bureau Risk Category </span></strong><span lang="JA">decision logic invokes the Pre-bureau </span>risk category table business knowledge model, passing Applicant data.ExistingCustomer as the Existing Customer parameter and the output of the Application risk score decision as the Application Risk Score parameter.</span></p>
+ Which risk category is most appropriate for this applicant given only their application data?
+ Value from explicit list "Decline", "High Risk", "Medium Risk", "Low Risk", "Very Low Risk"
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Pre-bureau risk category table
+
+
+
+
+ Applicant data.ExistingCustomer
+
+
+
+
+
+ Application risk score
+
+
+
+
+
+ <p><span style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"><span lang="JA">The </span><strong><span lang="JA">Pre-bureau risk category table </span></strong><span lang="JA">decision logic defines a complete, unique-hit decision table </span>deriving Pre-bureau risk category from Existing Customer and Application Risk Score.</span></p>
+
+
+
+
+
+
+
+ Existing Customer
+
+
+
+
+ Application Risk Score
+
+
+
+
+ "DECLINE","HIGH","MEDIUM","LOW","VERY LOW"
+
+
+
+
+
+ false
+
+
+ < 100
+
+
+ "HIGH"
+
+
+
+
+
+
+
+ false
+
+
+ [100..120)
+
+
+ "MEDIUM"
+
+
+
+
+
+
+
+ false
+
+
+ [120..130]
+
+
+ "LOW"
+
+
+
+
+
+
+
+ false
+
+
+ > 130
+
+
+ "VERY LOW"
+
+
+
+
+
+
+
+ true
+
+
+ < 80
+
+
+ "DECLINE"
+
+
+
+
+
+
+
+ true
+
+
+ [80..90)
+
+
+ "HIGH"
+
+
+
+
+
+
+
+ true
+
+
+ [90..110]
+
+
+ "MEDIUM"
+
+
+
+
+
+
+
+ true
+
+
+ > 110
+
+
+ "LOW"
+
+
+
+
+
+
+
+
+
+
+
+
+ <p><span style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"><span lang="JA">The </span><strong><span lang="JA">Application Risk Score </span></strong><span lang="JA">decision logic invokes the Application </span>risk score model business knowledge model, passing Applicant data.Age as the Age parameter, Applicant data.MaritalStatus as the Marital Status parameter and Applicant data.EmploymentStatus as the Employment Status parameter.</span></p>
+ What is the risk score for this applicant?
+ A number greater than 70 and less than 150
+
+
+
+
+
+
+
+
+
+
+
+ Application risk score model
+
+
+
+
+ Applicant data.Age
+
+
+
+
+
+ Applicant data.MartitalStatus
+
+
+
+
+
+ Applicant data.EmploymentStatus
+
+
+
+
+
+ <p>Credit risk scorecard analysis to determine the relevant factors for application risk scoring</p>
+
+
+
+
+
+
+
+
+
+ Analytic Insight
+
+
+
+ <p><span style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"><span lang="JA">The </span><strong><span lang="JA">Application risk score model </span></strong><span lang="JA">decision logic defines a complete, no-order multiple-hit table </span>with aggregation, deriving Application risk score from Age, Marital Status and Employment Status, as the sum of the Partial scores of all matching rows (this is therefore a predictive scorecard represented as a decision table).</span></p>
+
+
+
+
+
+
+
+
+ Age
+
+
+ [18..120]
+
+
+
+
+ Marital Status
+
+
+ "S","M"
+
+
+
+
+ Employment Status
+
+
+ "UNEMPLOYED","STUDENT","EMPLOYED","SELF-EMPLOYED"
+
+
+
+
+
+
+ [18..22)
+
+
+ -
+
+
+ -
+
+
+ 32
+
+
+
+
+
+
+
+ [22..26)
+
+
+ -
+
+
+ -
+
+
+ 35
+
+
+
+
+
+
+
+ [26..36)
+
+
+ -
+
+
+ -
+
+
+ 40
+
+
+
+
+
+
+
+ [36..50)
+
+
+ -
+
+
+ -
+
+
+ 43
+
+
+
+
+
+
+
+ >=50
+
+
+ -
+
+
+ -
+
+
+ 48
+
+
+
+
+
+
+
+ -
+
+
+ "S"
+
+
+ -
+
+
+ 25
+
+
+
+
+
+
+
+ -
+
+
+ "M"
+
+
+ -
+
+
+ 45
+
+
+
+
+
+
+
+ -
+
+
+ -
+
+
+ "UNEMPLOYED"
+
+
+ 15
+
+
+
+
+
+
+
+ -
+
+
+ -
+
+
+ "STUDENT"
+
+
+ 18
+
+
+
+
+
+
+
+ -
+
+
+ -
+
+
+ "EMPLOYED"
+
+
+ 45
+
+
+
+
+
+
+
+ -
+
+
+ -
+
+
+ "SELF-EMPLOYED"
+
+
+ 36
+
+
+
+
+
+
+
+
+
+
+
+
+ <p>Information about the applicant including personal information, marital status and household income/expenses.</p>
+
+
+
+ <p><span style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"><span lang="JA">The </span><strong><span lang="JA">Required monthly installment </span></strong><span lang="JA">decision logic invokes the </span>Installment calculation business knowledge model, passing Requested product.ProductType as the Product Type parameter, Requested product.Rate as the Rate parameter, Requested product.Term as the Term parameter, and Requested product.Amount as the Amount parameter.</span></p>
+ What is the minimum monthly installment payment required for this loan product?
+ A dollar amount greater than zero
+
+
+
+
+
+
+
+
+
+
+ Installment calculation
+
+
+
+
+ Requested product.ProductType
+
+
+
+
+
+ Requested product.Rate
+
+
+
+
+
+ Requested product.Term
+
+
+
+
+
+ Requested product.Amount
+
+
+
+
+
+ <p>Details of the loan the applicant has applied for.</p>
+
+
+
+ <p><span style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"><span lang="JA">The </span><strong><span lang="JA">Installment calculation </span></strong><span lang="JA">decision logic defines a boxed function deriving monthly installment </span>from Product Type, Rate, Term and Amount.</span></p>
+
+
+
+
+
+
+
+
+
+
+ if Product Type = "STANDARD LOAN"
+then 20.00
+else if Product Type = "SPECIAL LOAN"
+then 25.00
+else null
+
+
+
+
+
+ Financial.PMT(Rate, Term, Amount)
+
+
+
+
+ Monthly Repayment + Monthly Fee
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <p>Information about historical loan defaults.</p>
+
+
+
+ The credit risk scorecard is built from past applicants' data and information about those loans that defaulted. It must conform to the overall risk management strategy.
+
+
+ <p>Individuals in the Retail Banking organization responsible for manual adjudication of loans.</p>
+
+
+
+ <p>Organization responsible for defining loan and other banking products, how those products are priced, sold and tracked for profitability.</p>
+
+
+
+
+
+ <p>Organization within the bank responsible for defining credit risk strategies and policies and providing tools for managing against these.</p>
+
+
+
+
+
+
+
+
+
+ <p>Organization responsible for credit risk models and the use of data to predict credit risk for customers and loan applicants.</p>
+
+
+
+ <p>The percentage of loans accepted in a calendar month.</p>
+
+
+
+
+
+ <p>The percentage of loans that did not require a credit officer to review the case in a calendar month.</p>
+
+
+
+
+ <p>The total value of Loans written in a calendar month</p>
+
+
+
+
+
+ <p>By end of the current year, have an auto-adjudication rate of at least 90 percent</p>
+
+
+
+
+ <p>The total cost charged by the bureau for all Bureau Data requested while originating Loans in a calendar month.</p>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/kie-dmn/kie-dmn-test-resources/src/test/resources/invalid_models/DMNv1_x/multiple/importing.dmn b/kie-dmn/kie-dmn-test-resources/src/test/resources/invalid_models/DMNv1_x/multiple/importing.dmn
new file mode 100644
index 00000000000..b6c93039890
--- /dev/null
+++ b/kie-dmn/kie-dmn-test-resources/src/test/resources/invalid_models/DMNv1_x/multiple/importing.dmn
@@ -0,0 +1,67 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ import1.bkm1(a person) + " (age:" + string(a person.age) + ")."
+
+
+
+
+
+
+
+ 560
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/kie-dmn/kie-dmn-test-resources/src/test/resources/invalid_models/DMNv1_x/test.dmn b/kie-dmn/kie-dmn-test-resources/src/test/resources/invalid_models/DMNv1_x/test.dmn
new file mode 100644
index 00000000000..c0a01aeab66
--- /dev/null
+++ b/kie-dmn/kie-dmn-test-resources/src/test/resources/invalid_models/DMNv1_x/test.dmn
@@ -0,0 +1,158 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ FICO Score
+
+
+
+
+ DTI Rating
+
+
+
+
+ PITI Rating
+
+
+
+
+
+ <=750
+
+
+ -
+
+
+ -
+
+
+ "Not approved"
+
+
+
+
+ -
+
+
+ "Bad"
+
+
+ -
+
+
+ "Not approved"
+
+
+
+
+ -
+
+
+ -
+
+
+ "Bad"
+
+
+ "Not approved"
+
+
+
+
+ >750
+
+
+ "Good"
+
+
+ "Good"
+
+
+ "Approved"
+
+
+
+
+
+
+
+
+
+
+
+
+ DTI Ratio
+
+
+
+
+
+ <=0.20
+
+
+ "Good"
+
+
+
+
+ >0.20
+
+
+ "Bad"
+
+
+
+
+
+
+
+
+
+
+
+
+ PITI Ratio
+
+
+
+
+
+ <=0.28
+
+
+ "Good"
+
+
+
+
+ >0.28
+
+
+ "Bad"
+
+
+
+
+
diff --git a/kie-dmn/kie-dmn-test-resources/src/test/resources/AllowedValuesChecksInsideCollection.dmn b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_5/AllowedValuesChecksInsideCollection.dmn
similarity index 100%
rename from kie-dmn/kie-dmn-test-resources/src/test/resources/AllowedValuesChecksInsideCollection.dmn
rename to kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_5/AllowedValuesChecksInsideCollection.dmn
diff --git a/kie-dmn/kie-dmn-test-resources/src/test/resources/DateToDateTimeFunction.dmn b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_5/DateToDateTimeFunction.dmn
similarity index 100%
rename from kie-dmn/kie-dmn-test-resources/src/test/resources/DateToDateTimeFunction.dmn
rename to kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_5/DateToDateTimeFunction.dmn
diff --git a/kie-dmn/kie-dmn-test-resources/src/test/resources/ForLoopDatesEvaluate.dmn b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_5/ForLoopDatesEvaluate.dmn
similarity index 100%
rename from kie-dmn/kie-dmn-test-resources/src/test/resources/ForLoopDatesEvaluate.dmn
rename to kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_5/ForLoopDatesEvaluate.dmn
diff --git a/kie-dmn/kie-dmn-test-resources/src/test/resources/Imported_Model_Unamed.dmn b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_5/Imported_Model_Unamed.dmn
similarity index 100%
rename from kie-dmn/kie-dmn-test-resources/src/test/resources/Imported_Model_Unamed.dmn
rename to kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_5/Imported_Model_Unamed.dmn
diff --git a/kie-dmn/kie-dmn-test-resources/src/test/resources/Importing_EmptyNamed_Model.dmn b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_5/Importing_EmptyNamed_Model.dmn
similarity index 100%
rename from kie-dmn/kie-dmn-test-resources/src/test/resources/Importing_EmptyNamed_Model.dmn
rename to kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_5/Importing_EmptyNamed_Model.dmn
diff --git a/kie-dmn/kie-dmn-test-resources/src/test/resources/Importing_Named_Model.dmn b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_5/Importing_Named_Model.dmn
similarity index 100%
rename from kie-dmn/kie-dmn-test-resources/src/test/resources/Importing_Named_Model.dmn
rename to kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_5/Importing_Named_Model.dmn
diff --git a/kie-dmn/kie-dmn-test-resources/src/test/resources/Importing_OverridingEmptyNamed_Model.dmn b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_5/Importing_OverridingEmptyNamed_Model.dmn
similarity index 100%
rename from kie-dmn/kie-dmn-test-resources/src/test/resources/Importing_OverridingEmptyNamed_Model.dmn
rename to kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_5/Importing_OverridingEmptyNamed_Model.dmn
diff --git a/kie-dmn/kie-dmn-test-resources/src/test/resources/ListReplaceEvaluate.dmn b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_5/ListReplaceEvaluate.dmn
similarity index 100%
rename from kie-dmn/kie-dmn-test-resources/src/test/resources/ListReplaceEvaluate.dmn
rename to kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_5/ListReplaceEvaluate.dmn
diff --git a/kie-dmn/kie-dmn-test-resources/src/test/resources/NegationOfDurationEvaluate.dmn b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_5/NegationOfDurationEvaluate.dmn
similarity index 100%
rename from kie-dmn/kie-dmn-test-resources/src/test/resources/NegationOfDurationEvaluate.dmn
rename to kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_5/NegationOfDurationEvaluate.dmn
diff --git a/kie-dmn/kie-dmn-test-resources/src/test/resources/TypeConstraintsChecks.dmn b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_5/TypeConstraintsChecks.dmn
similarity index 100%
rename from kie-dmn/kie-dmn-test-resources/src/test/resources/TypeConstraintsChecks.dmn
rename to kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_5/TypeConstraintsChecks.dmn
diff --git a/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/OneOfEachType.dmn b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/OneOfEachType.dmn
new file mode 100644
index 00000000000..b08363988a8
--- /dev/null
+++ b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/OneOfEachType.dmn
@@ -0,0 +1,210 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ "Hello, "+InputString
+
+
+
+
+
+
+
+
+ InputNumber+1
+
+
+
+
+
+
+
+
+ not(InputBoolean)
+
+
+
+
+
+
+
+
+ InputDTDuration + duration("P1D")
+
+
+
+
+
+
+
+
+ InputYMDuration + duration("P1M")
+
+
+
+
+
+
+
+
+ InputDateAndTime+duration("PT1H")
+
+
+
+
+
+
+
+
+ InputDate+duration("P1D")
+
+
+
+
+
+
+
+
+ InputTime+duration("PT1H")
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/allTypes.dmn b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/allTypes.dmn
new file mode 100644
index 00000000000..826666a894f
--- /dev/null
+++ b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/allTypes.dmn
@@ -0,0 +1,368 @@
+
+
+
+ string
+
+
+ number
+
+
+ boolean
+
+
+
+
+ number
+
+
+
+ number
+
+
+ string
+
+
+
+ complexInputType
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ booleanInput
+
+
+
+
+ numberInput
+
+
+
+
+ stringInput
+
+
+
+
+
+
+ true
+
+
+ <= 20
+
+
+ -
+
+
+ 1
+
+
+
+
+
+
+
+ true
+
+
+ <= 50
+
+
+ -
+
+
+ 2
+
+
+
+
+
+
+
+ false
+
+
+ <= 10
+
+
+ -
+
+
+ 0
+
+
+
+
+
+
+
+ false
+
+
+ <= 40
+
+
+ -
+
+
+ 1.5
+
+
+
+
+
+
+
+ false
+
+
+ <= 60
+
+
+ "password"
+
+
+ 10
+
+
+
+
+
+
+
+ false
+
+
+ <= 70
+
+
+ "test"
+
+
+ 5
+
+
+
+
+
+
+
+
+
+
+
+
+ 50
+ 100
+ 100
+ 100
+ 100
+ 100
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/loan.dmn b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/loan.dmn
new file mode 100644
index 00000000000..23bc1dc064f
--- /dev/null
+++ b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/loan.dmn
@@ -0,0 +1,181 @@
+
+
+
+
+ number
+
+
+ number
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Credit score
+
+
+
+
+ DTI
+
+
+
+
+
+
+ <700
+
+
+ <=.28
+
+
+ true
+
+
+
+
+
+
+
+ >=700
+
+
+ -
+
+
+ true
+
+
+
+
+
+
+
+ <700
+
+
+ >.28
+
+
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (Loan.amount / Loan.years)/Salary
+
+
+
+
+
+
+
+ 50
+ 100
+ 100
+ 100
+ 100
+
+
+ 300
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/multiple/Financial.dmn b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/multiple/Financial.dmn
new file mode 100644
index 00000000000..5a722a9bc2a
--- /dev/null
+++ b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/multiple/Financial.dmn
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+ <p><span lang="JA">Standard calculation of monthly installment </span>from Rate, Term and Amount.</p>
+
+
+
+
+
+
+ (Amount *Rate/12) / (1 - (1 + Rate/12)**-Term)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/multiple/stdlib.dmn b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/multiple/stdlib.dmn
new file mode 100644
index 00000000000..19aa5a3ac60
--- /dev/null
+++ b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/multiple/stdlib.dmn
@@ -0,0 +1,45 @@
+
+
+
+
+ string
+
+
+ number
+
+
+
+
+
+
+
+
+ (if p.age > 47 then "Hello, " else "Ciao, ") + p.full name
+
+
+
+
+
+
+
+
+ 560
+
+
+ 50
+ 560
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/testWithExtensionElements.dmn b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/testWithExtensionElements.dmn
new file mode 100644
index 00000000000..d0a8067e992
--- /dev/null
+++ b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/testWithExtensionElements.dmn
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ n + m
+
+
+
+
+
+
+
+
+
+
+
+ 300
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/v1_5/DMN15ValidationsTest.java b/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/v1_5/DMN15ValidationsTest.java
index 90326b19a95..57a94b747a9 100644
--- a/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/v1_5/DMN15ValidationsTest.java
+++ b/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/v1_5/DMN15ValidationsTest.java
@@ -54,8 +54,8 @@ public class DMN15ValidationsTest {
@Test
public void overridingUnnamedImportValidation() {
- String importedModelFileName = "Imported_Model_Unamed.dmn";
- String importingModelFileName = "Importing_OverridingEmptyNamed_Model.dmn";
+ String importedModelFileName = "valid_models/DMNv1_5/Imported_Model_Unamed.dmn";
+ String importingModelFileName = "valid_models/DMNv1_5/Importing_OverridingEmptyNamed_Model.dmn";
String modelName = "Importing empty-named Model";
String modelNamespace = "http://www.trisotech.com/dmn/definitions/_f79aa7a4-f9a3-410a-ac95-bea496edabgc";
validate(importedModelFileName, importingModelFileName);
@@ -65,8 +65,8 @@ public void overridingUnnamedImportValidation() {
@Test
public void namedImportValidation() {
- String importedModelFileName = "Imported_Model_Unamed.dmn";
- String importingModelFileName = "Importing_Named_Model.dmn";
+ String importedModelFileName = "valid_models/DMNv1_5/Imported_Model_Unamed.dmn";
+ String importingModelFileName = "valid_models/DMNv1_5/Importing_Named_Model.dmn";
String modelName = "Importing named Model";
String modelNamespace = "http://www.trisotech.com/dmn/definitions/_f79aa7a4-f9a3-410a-ac95-bea496edabgc";
validate(importedModelFileName, importingModelFileName);
@@ -76,8 +76,8 @@ public void namedImportValidation() {
@Test
public void unnamedImportValidation() {
- String importedModelFileName = "Imported_Model_Unamed.dmn";
- String importingModelFileName = "Importing_EmptyNamed_Model.dmn";
+ String importedModelFileName = "valid_models/DMNv1_5/Imported_Model_Unamed.dmn";
+ String importingModelFileName = "valid_models/DMNv1_5/Importing_EmptyNamed_Model.dmn";
String modelName = "Importing empty-named Model";
String modelNamespace = "http://www.trisotech.com/dmn/definitions/_f79aa7a4-f9a3-410a-ac95-bea496edabgc";
validate(importedModelFileName, importingModelFileName);
@@ -87,7 +87,7 @@ public void unnamedImportValidation() {
@Test
public void forLoopDatesEvaluateValidation() {
- String modelFileName = "ForLoopDatesEvaluate.dmn";
+ String modelFileName = "valid_models/DMNv1_5/ForLoopDatesEvaluate.dmn";
String modelName = "For Loop Dates Evaluate";
String modelNamespace = "http://www.trisotech.com/dmn/definitions/_09E8A38A-AD24-4C3D-8307-029C0C4D373F";
validate(modelFileName);
@@ -96,7 +96,7 @@ public void forLoopDatesEvaluateValidation() {
@Test
public void listReplaceEvaluateValidation() {
- String modelFileName = "ListReplaceEvaluate.dmn";
+ String modelFileName = "valid_models/DMNv1_5/ListReplaceEvaluate.dmn";
String modelName = "List Replace Evaluate";
String modelNamespace = "http://www.trisotech.com/dmn/definitions/_09E8A38A-AD24-4C3D-8307-029C0C4D373F";
validate(modelFileName);
@@ -105,7 +105,7 @@ public void listReplaceEvaluateValidation() {
@Test
public void negationOfDurationEvaluateValidation() {
- String modelFileName = "NegationOfDurationEvaluate.dmn";
+ String modelFileName = "valid_models/DMNv1_5/NegationOfDurationEvaluate.dmn";
String modelName = "Negation of Duration Evaluate";
String modelNamespace = "http://www.trisotech.com/dmn/definitions/_09E8A38A-AD24-4C3D-8307-029C0C4D373F";
validate(modelFileName);
@@ -114,7 +114,7 @@ public void negationOfDurationEvaluateValidation() {
@Test
public void dateToDateTimeFunctionValidation() {
- String modelFileName = "DateToDateTimeFunction.dmn";
+ String modelFileName = "valid_models/DMNv1_5/DateToDateTimeFunction.dmn";
String modelName = "new-file";
String modelNamespace = "https://kiegroup.org/dmn/_A7F17D7B-F0AB-4C0B-B521-02EA26C2FBEE";
validate(modelFileName);
@@ -123,7 +123,7 @@ public void dateToDateTimeFunctionValidation() {
@Test
public void typeConstraintsChecksValidation() {
- String modelFileName = "TypeConstraintsChecks.dmn";
+ String modelFileName = "valid_models/DMNv1_5/TypeConstraintsChecks.dmn";
String modelName = "TypeConstraintsChecks";
String modelNamespace = "http://www.trisotech.com/definitions/_238bd96d-47cd-4746-831b-504f3e77b442";
validate(modelFileName);