This is an automated email from the ASF dual-hosted git repository.
gitgabrio pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie-drools.git
The following commit(s) were added to refs/heads/main by this push:
new 78fa4b8a27 [incubator-kie-issues#1882] DMN: Return full path of
invalid element (until its root) from jit-executor (#6291)
78fa4b8a27 is described below
commit 78fa4b8a27453f774926594b01aaafeca8646e64
Author: AthiraHari77 <[email protected]>
AuthorDate: Mon Apr 14 13:29:08 2025 +0530
[incubator-kie-issues#1882] DMN: Return full path of invalid element (until
its root) from jit-executor (#6291)
* [incubator-kie-issues#1882] Adding required invalid models to verify path
of invalid element
* [incubator-kie-issues#1882] Adding required invalid models
* [incubator-kie-issues#1882] Updated invalid model
* [incubator-kie-issues#1907] Propagating nested evaluation errors. Fix and
update tests
* [incubator-kie-issues#1907] Fix license header
* [incubator-kie-issues#1907] Cleanup
* [incubator-kie-issues#1882] code cleanup
---------
Co-authored-by: athira <[email protected]>
Co-authored-by: Gabriele-Cardosi <[email protected]>
---
.../core/ast/DMNLiteralExpressionEvaluator.java | 55 ++++--
.../java/org/kie/dmn/core/impl/DMNRuntimeImpl.java | 12 +-
.../kie/dmn/core/DMNDecisionTableRuntimeTest.java | 6 +-
.../java/org/kie/dmn/core/DMNInputRuntimeTest.java | 50 ++++++
.../test/java/org/kie/dmn/core/DMNRuntimeTest.java | 22 +--
.../kie/dmn/core/v1_4/DMN14ExpressionsTest.java | 5 +-
.../core/v1_1/DMNDecisionTableRuntimeTest.java | 4 +-
.../dmn/legacy/tests/core/v1_1/DMNRuntimeTest.java | 6 +-
.../DMNv1_5/DMN-MultipleInvalidElements.dmn | 188 +++++++++++++++++++++
.../invalid_models/DMNv1_5/InvalidElementPath.dmn | 67 ++++++++
.../dmn/trisotech/core/DMN14ExpressionsTest.java | 4 +-
11 files changed, 375 insertions(+), 44 deletions(-)
diff --git
a/kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/ast/DMNLiteralExpressionEvaluator.java
b/kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/ast/DMNLiteralExpressionEvaluator.java
index 9c9016922d..33c80b4c15 100644
---
a/kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/ast/DMNLiteralExpressionEvaluator.java
+++
b/kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/ast/DMNLiteralExpressionEvaluator.java
@@ -1,4 +1,4 @@
-/**
+/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,7 +7,7 @@
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -20,6 +20,9 @@ package org.kie.dmn.core.ast;
import java.util.ArrayList;
import java.util.List;
+import java.util.Objects;
+import java.util.Set;
+import java.util.stream.Collectors;
import org.kie.dmn.api.core.DMNMessage;
import org.kie.dmn.api.core.DMNResult;
@@ -86,21 +89,47 @@ public class DMNLiteralExpressionEvaluator
EvaluationContextImpl ectx =
feelInstance.newEvaluationContext(List.of(liListener),
result.getContext().getAll());
ectx.setDMNRuntime(dmrem.getRuntime());
// in case an exception is thrown, the parent node will report it
+ Set<FEELEvent> previousFeelEvents =
result.getMessages(DMNMessage.Severity.WARN, DMNMessage.Severity.ERROR)
+ .stream()
+ .map(DMNMessage::getFeelEvent)
+ .filter(Objects::nonNull)
+ .collect(Collectors.toSet());
Object val = feelInstance.evaluate(expression, ectx);
- ResultType resultType = ResultType.SUCCESS;
+ Set<FEELEvent> currentFeelEvents =
result.getMessages(DMNMessage.Severity.WARN, DMNMessage.Severity.ERROR)
+ .stream()
+ .map(DMNMessage::getFeelEvent)
+ .filter(Objects::nonNull)
+ .collect(Collectors.toSet());
+ currentFeelEvents.removeAll(previousFeelEvents);
+ boolean error = false;
for (FEELEvent captured : liListener.events) {
MsgUtil.reportMessage(LOG,
-
dmnSeverityFromFEELSeverity(captured.getSeverity()),
- expressionNode,
- result,
- null,
- captured,
- Msg.FEEL_EVENT_EVAL_LITERAL_EXPRESSION,
- captured.getSeverity().toString(),
- MsgUtil.clipString(expressionNode.getText(),
50),
- captured.getMessage());
- resultType =
getFEELDialectAdaptedResultType(captured.getSeverity(), val,
feelInstance.getFeelDialect());
+ dmnSeverityFromFEELSeverity(captured.getSeverity()),
+ expressionNode,
+ result,
+ null,
+ captured,
+ Msg.FEEL_EVENT_EVAL_LITERAL_EXPRESSION,
+ captured.getSeverity().toString(),
+ MsgUtil.clipString(expressionNode.getText(), 50),
+ captured.getMessage());
+ error = error || captured.getSeverity() == Severity.ERROR;
+ }
+ for (FEELEvent captured : currentFeelEvents) {
+ MsgUtil.reportMessage(LOG,
+ dmnSeverityFromFEELSeverity(captured.getSeverity()),
+ expressionNode,
+ result,
+ null,
+ captured,
+ Msg.FEEL_EVENT_EVAL_LITERAL_EXPRESSION,
+ captured.getSeverity().toString(),
+ MsgUtil.clipString(expressionNode.getText(), 50),
+ captured.getMessage());
+ error = error || captured.getSeverity() == Severity.ERROR;
}
+ Severity severity = error ? Severity.ERROR : Severity.INFO;
+ ResultType resultType = getFEELDialectAdaptedResultType(severity, val,
feelInstance.getFeelDialect());
return new EvaluatorResultImpl(val, resultType);
}
diff --git
a/kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/impl/DMNRuntimeImpl.java
b/kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/impl/DMNRuntimeImpl.java
index 4ef3fa4383..933c2fa07e 100644
---
a/kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/impl/DMNRuntimeImpl.java
+++
b/kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/impl/DMNRuntimeImpl.java
@@ -706,7 +706,16 @@ public class DMNRuntimeImpl
dr.setResult( value );
dr.setEvaluationStatus(
DMNDecisionResult.DecisionEvaluationStatus.SUCCEEDED );
} else {
- dr.setEvaluationStatus(
DMNDecisionResult.DecisionEvaluationStatus.FAILED );
+ DMNMessage message = MsgUtil.reportMessage( logger,
+ DMNMessage.Severity.ERROR,
+ decision.getSource(),
+ result,
+ null,
+ null,
+ Msg.ERROR_EVAL_DECISION_NODE,
+ getIdentifier( decision ),
+ decision.getResultType() );
+ reportFailure( dr, message,
DMNDecisionResult.DecisionEvaluationStatus.FAILED );
return false;
}
} catch( Throwable t ) {
@@ -719,7 +728,6 @@ public class DMNRuntimeImpl
Msg.ERROR_EVAL_DECISION_NODE,
getIdentifier(
decision ),
t.getMessage() );
-
reportFailure( dr, message,
DMNDecisionResult.DecisionEvaluationStatus.FAILED );
}
return true;
diff --git
a/kie-dmn/kie-dmn-core/src/test/java/org/kie/dmn/core/DMNDecisionTableRuntimeTest.java
b/kie-dmn/kie-dmn-core/src/test/java/org/kie/dmn/core/DMNDecisionTableRuntimeTest.java
index e772dcf592..d53b372861 100644
---
a/kie-dmn/kie-dmn-core/src/test/java/org/kie/dmn/core/DMNDecisionTableRuntimeTest.java
+++
b/kie-dmn/kie-dmn-core/src/test/java/org/kie/dmn/core/DMNDecisionTableRuntimeTest.java
@@ -1,4 +1,4 @@
-/**
+/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -175,7 +175,7 @@ public class DMNDecisionTableRuntimeTest extends
BaseInterpretedVsCompiledTest {
final DMNResult dmnResult = runtime.evaluateAll( dmnModel, context );
assertThat( dmnResult.hasErrors()).isTrue();
assertThat( dmnResult.getMessages().stream().filter(
- message -> message.getFeelEvent().getSourceException()
instanceof NullPointerException ).count()).isEqualTo(0L );
+ message -> message.getFeelEvent() != null &&
message.getFeelEvent().getSourceException() instanceof NullPointerException
).count()).isEqualTo(0L );
}
@ParameterizedTest
@@ -654,7 +654,7 @@ public class DMNDecisionTableRuntimeTest extends
BaseInterpretedVsCompiledTest {
final DMNDecisionResult result = runtime.evaluateByName(model,
context, "Result").getDecisionResultByName("Result");
assertThat(result.getEvaluationStatus()).isEqualTo(expectedStatus);
- assertThat(result.hasErrors()).isFalse();
+
assertThat(result.hasErrors()).isEqualTo(expectedStatus.equals(DMNDecisionResult.DecisionEvaluationStatus.FAILED));
assertThat(result.getResult()).isEqualTo(expectedResult);
}
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 27140431ae..8097dd2cd2 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
@@ -22,8 +22,10 @@ import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
+import java.util.HashSet;
import java.util.List;
import java.util.Set;
+import java.util.stream.Collectors;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource;
@@ -650,4 +652,52 @@ public class DMNInputRuntimeTest extends
BaseInterpretedVsCompiledTest {
assertThat(node.getName().endsWith("" + index++)).isTrue();
}
}
+
+ @ParameterizedTest
+ @MethodSource("params")
+ void multipleInvalidElements(boolean useExecModelCompiler) {
+ init(useExecModelCompiler);
+ final DMNRuntime runtime =
DMNRuntimeUtil.createRuntime("invalid_models/DMNv1_5/DMN-MultipleInvalidElements.dmn",
+ this.getClass());
+ final DMNModel dmnModel =
runtime.getModel("https://kie.org/dmn/_79591DB5-1EE1-4CBD-AA5D-2E3EDF31150E",
+ "DMN_8F7C4323-412A-4E0B-9AEF-0F24C8F55282");
+ assertThat(dmnModel).isNotNull();
+
assertThat(dmnModel.hasErrors()).as(DMNRuntimeUtil.formatMessages(dmnModel.getMessages())).isFalse();
+
+ final DMNContext dmnContext = DMNFactory.newContext();
+ dmnContext.set("id", "_7273EA2E-2CC3-4012-8F87-39E310C8DF3C");
+ dmnContext.set("Conditional Input", 107);
+ dmnContext.set("New Input Data", 8888);
+ dmnContext.set("Score", 8);
+ final DMNResult dmnResult = runtime.evaluateAll(dmnModel, dmnContext);
+
assertThat(dmnResult.hasErrors()).as(DMNRuntimeUtil.formatMessages(dmnResult.getMessages())).isTrue();
+
+ String decision1SourceId = "_A40F3AA4-2832-4D98-83F0-7D604F9A090F";
+ String decision2SourceId = "_3DC41DB9-BE1D-4289-A639-24AB57ED082D";
+ String decision1RoundUpLiteralExpressionSourceId =
"_2E43C09D-011A-436C-B40B-9154405EAF3A";
+ String decision2RoundUpLiteralExpressionSourceId =
"_43236F2B-9857-454F-8EA0-39B37C7519CF";
+ String businessKnowledgeModelExpressionSourceId =
"_4AC1BD7D-5A8D-4A88-94F9-0B80BDF0D9B1";
+ Set<String> expectedIds = new
HashSet<>(Arrays.asList(decision1SourceId,
+ decision2SourceId,
+ decision1RoundUpLiteralExpressionSourceId,
+ decision2RoundUpLiteralExpressionSourceId,
+ businessKnowledgeModelExpressionSourceId));
+
+ assertThat(dmnResult.getMessages()).hasSize(6);
+ Set<String> retrievedIds =
dmnResult.getMessages(DMNMessage.Severity.ERROR)
+ .stream()
+ .map(DMNMessage::getSourceId)
+ .collect(Collectors.toSet());
+
assertThat(retrievedIds).hasSameSizeAs(expectedIds).containsAll(expectedIds);
+
+ // Decision1 and Decision2 are expected to fail
+ DMNDecisionResult retrievedResult =
dmnResult.getDecisionResultById(decision1SourceId);
+ assertThat(retrievedResult).isNotNull();
+
assertThat(retrievedResult.getEvaluationStatus()).isEqualTo(DMNDecisionResult.DecisionEvaluationStatus.FAILED);
+ retrievedResult = dmnResult.getDecisionResultById(decision2SourceId);
+ assertThat(retrievedResult).isNotNull();
+
assertThat(retrievedResult.getEvaluationStatus()).isEqualTo(DMNDecisionResult.DecisionEvaluationStatus.FAILED);
+
+
+ }
}
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 b84932427a..b59610dcb4 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
@@ -504,8 +504,6 @@ public class DMNRuntimeTest extends
BaseInterpretedVsCompiledTest {
void bkmNode(boolean useExecModelCompiler) {
init(useExecModelCompiler);
final DMNRuntime runtime =
DMNRuntimeUtil.createRuntime("0009-invocation-arithmetic.dmn", getClass());
-// runtime.addListener( DMNRuntimeUtil.createListener() );
-
final DMNModel dmnModel =
runtime.getModel("http://www.trisotech.com/definitions/_cb28c255-91cd-4c01-ac7b-1a9cb1ecdb11",
"literal invocation1");
assertThat(dmnModel).isNotNull();
assertThat(dmnModel.hasErrors()).as(dmnModel.getMessages().toString()).isFalse();
@@ -530,8 +528,6 @@ public class DMNRuntimeTest extends
BaseInterpretedVsCompiledTest {
void itemDefCollection(boolean useExecModelCompiler) {
init(useExecModelCompiler);
final DMNRuntime runtime =
DMNRuntimeUtil.createRuntime("0001-filter.dmn", getClass());
-// runtime.addListener( DMNRuntimeUtil.createListener() );
-
final DMNModel dmnModel =
runtime.getModel("http://www.trisotech.com/definitions/_f52ca843-504b-4c3b-a6bc-4d377bffef7a",
"filter01");
assertThat(dmnModel).isNotNull();
assertThat(dmnModel.hasErrors()).as(dmnModel.getMessages().toString()).isFalse();
@@ -562,8 +558,6 @@ public class DMNRuntimeTest extends
BaseInterpretedVsCompiledTest {
void list(boolean useExecModelCompiler) {
init(useExecModelCompiler);
final DMNRuntime runtime =
DMNRuntimeUtil.createRuntime("list-expression.dmn", getClass());
-// runtime.addListener( DMNRuntimeUtil.createListener() );
-
final DMNModel dmnModel =
runtime.getModel("https://github.com/kiegroup/kie-dmn", "list-expression");
assertThat(dmnModel).isNotNull();
assertThat(dmnModel.hasErrors()).as(dmnModel.getMessages().toString()).isFalse();
@@ -579,8 +573,6 @@ public class DMNRuntimeTest extends
BaseInterpretedVsCompiledTest {
void relation(boolean useExecModelCompiler) {
init(useExecModelCompiler);
final DMNRuntime runtime =
DMNRuntimeUtil.createRuntime("relation-expression.dmn", getClass());
-// runtime.addListener( DMNRuntimeUtil.createListener() );
-
final DMNModel dmnModel =
runtime.getModel("https://github.com/kiegroup/kie-dmn", "relation-expression");
assertThat(dmnModel).isNotNull();
assertThat(dmnModel.hasErrors()).as(dmnModel.getMessages().toString()).isFalse();
@@ -607,8 +599,6 @@ public class DMNRuntimeTest extends
BaseInterpretedVsCompiledTest {
void lendingExample(boolean useExecModelCompiler) {
init(useExecModelCompiler);
final DMNRuntime runtime =
DMNRuntimeUtil.createRuntime("0004-lending.dmn", getClass());
-// runtime.addListener( DMNRuntimeUtil.createListener() );
-
final DMNModel dmnModel =
runtime.getModel("http://www.trisotech.com/definitions/_4e0f0b70-d31c-471c-bd52-5ca709ed362b",
"Lending1");
assertThat(dmnModel).isNotNull();
assertThat(dmnModel.hasErrors()).as(DMNRuntimeUtil.formatMessages(dmnModel.getMessages())).isFalse();
@@ -914,9 +904,10 @@ public class DMNRuntimeTest extends
BaseInterpretedVsCompiledTest {
final DMNResult dmnResult = runtime.evaluateAll(dmnModel, context);
assertThat(dmnResult.hasErrors()).as(dmnResult.getMessages().toString()).isTrue();
- assertThat(dmnResult.getMessages()).hasSize(2);
+ assertThat(dmnResult.getMessages()).hasSize(3);
assertThat(dmnResult.getMessages().get(0).getSourceId()).isEqualTo("_c5eda7c3-7f22-43c2-8c1e-a3cc79bb7a74");
-
assertThat(dmnResult.getMessages().get(1).getSourceId()).isEqualTo("_5bac3e4c-b59a-4f14-b5cf-d4d88c60877f");
+
assertThat(dmnResult.getMessages().get(1).getSourceId()).isEqualTo("_c5eda7c3-7f22-43c2-8c1e-a3cc79bb7a74");
+
assertThat(dmnResult.getMessages().get(2).getSourceId()).isEqualTo("_5bac3e4c-b59a-4f14-b5cf-d4d88c60877f");
}
@ParameterizedTest
@@ -1662,7 +1653,7 @@ public class DMNRuntimeTest extends
BaseInterpretedVsCompiledTest {
final DMNResult dmnResult = runtime.evaluateAll(dmnModel,
wrongContext);
assertThat(dmnResult.hasErrors()).as(dmnResult.getMessages().toString()).isTrue();
// total of: 2. x1 error in calling external decision, and x1 error in
making final decision as it depends on the former.
-
assertThat(dmnResult.getMessages()).as(DMNRuntimeUtil.formatMessages(dmnResult.getMessages())).hasSize(2);
+
assertThat(dmnResult.getMessages()).as(DMNRuntimeUtil.formatMessages(dmnResult.getMessages())).hasSize(3);
}
@ParameterizedTest
@@ -1683,7 +1674,7 @@ public class DMNRuntimeTest extends
BaseInterpretedVsCompiledTest {
final DMNResult dmnResult = runtime.evaluateAll(dmnModel,
wrongContext);
assertThat(dmnResult.hasErrors()).as(dmnResult.getMessages().toString()).isTrue();
// total of: 2. x1 error in calling external decision, and x1 error in
making final decision as it depends on the former.
-
assertThat(dmnResult.getMessages()).as(DMNRuntimeUtil.formatMessages(dmnResult.getMessages())).hasSize(2);
+
assertThat(dmnResult.getMessages()).as(DMNRuntimeUtil.formatMessages(dmnResult.getMessages())).hasSize(3);
}
@@ -1707,7 +1698,7 @@ public class DMNRuntimeTest extends
BaseInterpretedVsCompiledTest {
assertThat(dmnResult.hasErrors()).as(dmnResult.getMessages().toString()).isTrue();
// total of: 2. x1 error in calling external decision, and x1 error in
making final decision as it depends on the former.
// please notice it will print 4 lines in the log, 2x are the
"external invocation" and then 2x are the one by the caller, checked herebelow:
-
assertThat(dmnResult.getMessages()).as(DMNRuntimeUtil.formatMessages(dmnResult.getMessages())).hasSize(2);
+
assertThat(dmnResult.getMessages()).as(DMNRuntimeUtil.formatMessages(dmnResult.getMessages())).hasSize(3);
}
@ParameterizedTest
@@ -1839,7 +1830,6 @@ public class DMNRuntimeTest extends
BaseInterpretedVsCompiledTest {
context.set("number", 123.123456d);
final DMNResult dmnResult = runtime.evaluateAll(dmnModel, context);
- System.out.println(dmnResult);
assertThat(dmnResult.hasErrors()).as(DMNRuntimeUtil.formatMessages(dmnResult.getMessages())).isFalse();
final DMNContext result = dmnResult.getContext();
diff --git
a/kie-dmn/kie-dmn-core/src/test/java/org/kie/dmn/core/v1_4/DMN14ExpressionsTest.java
b/kie-dmn/kie-dmn-core/src/test/java/org/kie/dmn/core/v1_4/DMN14ExpressionsTest.java
index 1fd9851f69..4e7cff8f5e 100644
---
a/kie-dmn/kie-dmn-core/src/test/java/org/kie/dmn/core/v1_4/DMN14ExpressionsTest.java
+++
b/kie-dmn/kie-dmn-core/src/test/java/org/kie/dmn/core/v1_4/DMN14ExpressionsTest.java
@@ -1,4 +1,4 @@
-/**
+/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -80,9 +80,8 @@ public class DMN14ExpressionsTest extends BaseVariantTest {
testConfig = conf;
setup();
DMNResult results = runtime.evaluateByName(model, new
DMNContextImpl(), "Non boolean");
- assertThat(results.getMessages()).hasSize(1);
+ assertThat(results.getMessages()).hasSize(2);
assertThat(results.getMessages().iterator().next().getMessageType()).isEqualTo(DMNMessageType.ERROR_EVAL_NODE);
-
}
@MethodSource("params")
diff --git
a/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/core/v1_1/DMNDecisionTableRuntimeTest.java
b/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/core/v1_1/DMNDecisionTableRuntimeTest.java
index 7a5c7d1141..a160371d0e 100644
---
a/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/core/v1_1/DMNDecisionTableRuntimeTest.java
+++
b/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/core/v1_1/DMNDecisionTableRuntimeTest.java
@@ -1,4 +1,4 @@
-/**
+/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -152,7 +152,7 @@ public class DMNDecisionTableRuntimeTest extends
BaseDMN1_1VariantTest {
final DMNResult dmnResult = runtime.evaluateAll( dmnModel, context );
assertThat( dmnResult.hasErrors()).isTrue();
assertThat( dmnResult.getMessages().stream().filter(
- message -> message.getFeelEvent().getSourceException()
instanceof NullPointerException ).count()).isEqualTo(0L );
+ message -> message.getFeelEvent() != null &&
message.getFeelEvent().getSourceException() instanceof NullPointerException
).count()).isEqualTo(0L );
}
@ParameterizedTest(name = "{0}")
diff --git
a/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/core/v1_1/DMNRuntimeTest.java
b/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/core/v1_1/DMNRuntimeTest.java
index f9f5d69b5c..db9cf9007e 100644
---
a/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/core/v1_1/DMNRuntimeTest.java
+++
b/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/core/v1_1/DMNRuntimeTest.java
@@ -1531,7 +1531,7 @@ public class DMNRuntimeTest extends BaseDMN1_1VariantTest
{
final DMNResult dmnResult = runtime.evaluateAll(dmnModel,
wrongContext);
assertThat(dmnResult.hasErrors()).as(DMNRuntimeUtil.formatMessages(dmnResult.getMessages())).isTrue();
// total of: 2. x1 error in calling external decision, and x1 error in
making final decision as it depends on the former.
-
assertThat(dmnResult.getMessages()).as(DMNRuntimeUtil.formatMessages(dmnResult.getMessages())).hasSize(2);
+
assertThat(dmnResult.getMessages()).as(DMNRuntimeUtil.formatMessages(dmnResult.getMessages())).hasSize(3);
}
@ParameterizedTest(name = "{0}")
@@ -1552,7 +1552,7 @@ public class DMNRuntimeTest extends BaseDMN1_1VariantTest
{
final DMNResult dmnResult = runtime.evaluateAll(dmnModel,
wrongContext);
assertThat(dmnResult.hasErrors()).as(DMNRuntimeUtil.formatMessages(dmnResult.getMessages())).isTrue();
// total of: 2. x1 error in calling external decision, and x1 error in
making final decision as it depends on the former.
-
assertThat(dmnResult.getMessages()).as(DMNRuntimeUtil.formatMessages(dmnResult.getMessages())).hasSize(2);
+
assertThat(dmnResult.getMessages()).as(DMNRuntimeUtil.formatMessages(dmnResult.getMessages())).hasSize(3);
}
@ParameterizedTest(name = "{0}")
@@ -1575,7 +1575,7 @@ public class DMNRuntimeTest extends BaseDMN1_1VariantTest
{
assertThat(dmnResult.hasErrors()).as(DMNRuntimeUtil.formatMessages(dmnResult.getMessages())).isTrue();
// total of: 2. x1 error in calling external decision, and x1 error in
making final decision as it depends on the former.
// please notice it will print 4 lines in the log, 2x are the
"external invocation" and then 2x are the one by the caller, checked herebelow:
-
assertThat(dmnResult.getMessages()).as(DMNRuntimeUtil.formatMessages(dmnResult.getMessages())).hasSize(2);
+
assertThat(dmnResult.getMessages()).as(DMNRuntimeUtil.formatMessages(dmnResult.getMessages())).hasSize(3);
}
@ParameterizedTest(name = "{0}")
diff --git
a/kie-dmn/kie-dmn-test-resources/src/test/resources/invalid_models/DMNv1_5/DMN-MultipleInvalidElements.dmn
b/kie-dmn/kie-dmn-test-resources/src/test/resources/invalid_models/DMNv1_5/DMN-MultipleInvalidElements.dmn
new file mode 100644
index 0000000000..961f54248b
--- /dev/null
+++
b/kie-dmn/kie-dmn-test-resources/src/test/resources/invalid_models/DMNv1_5/DMN-MultipleInvalidElements.dmn
@@ -0,0 +1,188 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<definitions xmlns="https://www.omg.org/spec/DMN/20230324/MODEL/"
xmlns:dmndi="https://www.omg.org/spec/DMN/20230324/DMNDI/"
xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/"
xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/"
xmlns:kie="https://kie.org/dmn/extensions/1.0"
expressionLanguage="https://www.omg.org/spec/DMN/20230324/FEEL/"
namespace="https://kie.org/dmn/_79591DB5-1EE1-4CBD-AA5D-2E3EDF31150E"
id="_C8433920-37EC-4814-A3DE-197917CDEB52"
name="DMN_8F7C4323-412A-4E0B-9AEF-0F24 [...]
+ <inputData name="New Input Data" id="_3A190E59-760B-45C2-86E6-2D50D8D9527C">
+ <variable name="New Input Data" id="_CE5FC851-DED9-48C1-9540-08ACDC56312C"
typeRef="number" />
+ </inputData>
+ <decision name="Decision1" id="_A40F3AA4-2832-4D98-83F0-7D604F9A090F">
+ <variable id="_9E0A3CF8-7B76-4908-B9A5-6ADED81780F4" typeRef="number"
name="Decision1" />
+ <informationRequirement id="_35609EBD-709A-4130-BFF9-826AA6FB605F">
+ <requiredInput href="#_3A190E59-760B-45C2-86E6-2D50D8D9527C" />
+ </informationRequirement>
+ <knowledgeRequirement id="_B27B7577-2FF5-47C9-8693-FAEECEE52EFB">
+ <requiredKnowledge href="#_09186183-0646-4CD0-AD67-A159E9F87F5E" />
+ </knowledgeRequirement>
+ <literalExpression id="_4AC1BD7D-5A8D-4A88-94F9-0B80BDF0D9B1"
typeRef="number" label="Decision1">
+ <text>Round Up(New Input Data)</text>
+ </literalExpression>
+ </decision>
+ <decision name="Decision2" id="_3DC41DB9-BE1D-4289-A639-24AB57ED082D">
+ <variable id="_ABCF6EB8-CF66-4D12-9B26-5D109C69328A" name="Decision2" />
+ <informationRequirement id="_5848A89D-BEED-4BCC-AFC5-EB2D96AE2A9F">
+ <requiredInput href="#_ED8D803B-1CE0-4BBF-B515-FFD98FD8BF21" />
+ </informationRequirement>
+ <conditional id="_2B147ECC-2457-4623-B841-3360D75F9F76" label="Decision2">
+ <if id="_AB2F8078-B54D-4D12-A9EB-1ABA5FA276F8">
+ <literalExpression id="_E9277A40-E525-40BB-90B5-540E81B0F451"
label="Expression Name">
+ <text>Conditional Input < 100</text>
+ </literalExpression>
+ </if>
+ <then id="_300AAEEE-70C0-4CEF-B241-FD6424D95C08">
+ <literalExpression id="_1FD8E4FC-8375-4EBB-B474-2BA28A3D613C"
label="Expression Name">
+ <text>100</text>
+ </literalExpression>
+ </then>
+ <else id="_6F318F57-DA06-4F71-80AD-288E0BBB3A52">
+ <literalExpression id="_43236F2B-9857-454F-8EA0-39B37C7519CF"
label="Expression Name">
+ <text>round up(Conditional Input, 15000)</text>
+ </literalExpression>
+ </else>
+ </conditional>
+ </decision>
+ <businessKnowledgeModel name="Round Up"
id="_09186183-0646-4CD0-AD67-A159E9F87F5E">
+ <variable name="Round Up" id="_D9B2ABE3-8F70-47EB-9F58-06A442F1AFB1"
typeRef="number" />
+ <encapsulatedLogic label="Round Up" typeRef="number"
id="_D386D137-582B-49F9-B6F9-F341C3AC4B3E" kind="FEEL">
+ <formalParameter id="_BD31D51E-29BC-49E5-97EE-55571DD97A35" name="New
Input Data" typeRef="number" />
+ <literalExpression id="_2E43C09D-011A-436C-B40B-9154405EAF3A"
typeRef="number" label="Return">
+ <text>round up(New Input Data, 12000)</text>
+ </literalExpression>
+ </encapsulatedLogic>
+ </businessKnowledgeModel>
+ <inputData name="Conditional Input"
id="_ED8D803B-1CE0-4BBF-B515-FFD98FD8BF21">
+ <variable name="Conditional Input"
id="_6953E989-101B-4AC9-AA08-963CFD8D7C7F" typeRef="number" />
+ </inputData>
+ <inputData name="Score" id="_75C34B3D-3B34-4E4A-97FE-BC349E436384">
+ <variable name="Score" id="_BA30B1A4-6AA6-45C1-AC3B-401401A19CC0"
typeRef="number" />
+ </inputData>
+ <decision name="Decision3" id="_E9468D45-51EB-48DA-8B30-7D65696FDFB8">
+ <variable name="Decision3" id="_58E0F2FB-0468-491F-96E3-22EE34F6394C"
typeRef="string" />
+ <informationRequirement id="_5CA9FF49-53D6-4531-BD54-A83FE0517FA5">
+ <requiredInput href="#_75C34B3D-3B34-4E4A-97FE-BC349E436384" />
+ </informationRequirement>
+ <decisionTable id="_E501048E-2655-46F8-95DE-39ECBED586A8" typeRef="string"
hitPolicy="UNIQUE" label="Decision3">
+ <input id="_1B359AD0-A378-47E7-AE30-CB4EE2AAFE1B">
+ <inputExpression id="_40F8D7F7-997F-4FBB-A0A5-58220C7D8054"
typeRef="number">
+ <text>Score</text>
+ </inputExpression>
+ </input>
+ <output id="_FAC0CB76-27A8-401A-8E6C-84260A1356DD" />
+ <annotation name="Annotations" />
+ <rule id="_5FC8F0E5-41A9-44BA-90AA-8F8C4ACE9659">
+ <inputEntry id="_57E40741-AABE-4E01-95DF-5A8C2240F9D0">
+ <text>>=90</text>
+ </inputEntry>
+ <outputEntry id="_BF64C76F-25EE-485A-AC38-87A986DC591E">
+ <text>"Excellent"</text>
+ </outputEntry>
+ <annotationEntry>
+ <text></text>
+ </annotationEntry>
+ </rule>
+ <rule id="_80A8E701-D227-4536-879C-E75BBE7D4CEB">
+ <inputEntry id="_AF86852D-F96D-4E72-BF71-A02E2308DF36">
+ <text>[70..90)</text>
+ </inputEntry>
+ <outputEntry id="_5AF82E14-2401-4300-9FBA-AF971BB19256">
+ <text>"Good"</text>
+ </outputEntry>
+ <annotationEntry>
+ <text></text>
+ </annotationEntry>
+ </rule>
+ <rule id="_A088B541-B86C-4A2E-ADF8-9D3BB18274AB">
+ <inputEntry id="_C44B2FE7-026A-400A-8D81-3A316D8B5E12">
+ <text>[50..70)</text>
+ </inputEntry>
+ <outputEntry id="_E7E20B17-82D7-4272-BB15-3ABEDE747ADA">
+ <text>"Fair"</text>
+ </outputEntry>
+ <annotationEntry>
+ <text></text>
+ </annotationEntry>
+ </rule>
+ </decisionTable>
+ </decision>
+ <dmndi:DMNDI>
+ <dmndi:DMNDiagram id="_35F2B440-6456-4617-9288-C1DB4571BD64" name="Default
DRD" useAlternativeInputDataShape="false">
+ <di:extension>
+ <kie:ComponentsWidthsExtension>
+ <kie:ComponentWidths
dmnElementRef="_4AC1BD7D-5A8D-4A88-94F9-0B80BDF0D9B1">
+ <kie:width>190</kie:width>
+ </kie:ComponentWidths>
+ <kie:ComponentWidths
dmnElementRef="_2E43C09D-011A-436C-B40B-9154405EAF3A">
+ <kie:width>190</kie:width>
+ </kie:ComponentWidths>
+ <kie:ComponentWidths
dmnElementRef="_E9277A40-E525-40BB-90B5-540E81B0F451">
+ <kie:width>190</kie:width>
+ </kie:ComponentWidths>
+ <kie:ComponentWidths
dmnElementRef="_1FD8E4FC-8375-4EBB-B474-2BA28A3D613C">
+ <kie:width>190</kie:width>
+ </kie:ComponentWidths>
+ <kie:ComponentWidths
dmnElementRef="_43236F2B-9857-454F-8EA0-39B37C7519CF">
+ <kie:width>190</kie:width>
+ </kie:ComponentWidths>
+ <kie:ComponentWidths
dmnElementRef="_E501048E-2655-46F8-95DE-39ECBED586A8">
+ <kie:width>60</kie:width>
+ <kie:width>118</kie:width>
+ <kie:width>118</kie:width>
+ <kie:width>240</kie:width>
+ </kie:ComponentWidths>
+ </kie:ComponentsWidthsExtension>
+ </di:extension>
+ <dmndi:DMNShape id="_10BB430B-C3BB-4787-8BD3-C16902638A42"
dmnElementRef="_3A190E59-760B-45C2-86E6-2D50D8D9527C" isCollapsed="false"
isListedInputData="false">
+ <dc:Bounds x="60" y="-20" width="160" height="80" />
+ </dmndi:DMNShape>
+ <dmndi:DMNShape id="_2AE7DDAE-7164-4079-BFB1-D3D64EDCDE1D"
dmnElementRef="_A40F3AA4-2832-4D98-83F0-7D604F9A090F" isCollapsed="false"
isListedInputData="false">
+ <dc:Bounds x="320" y="-20" width="160" height="80" />
+ </dmndi:DMNShape>
+ <dmndi:DMNShape id="_E4AF0974-016B-427B-B3B7-D61CBE26FD14"
dmnElementRef="_3DC41DB9-BE1D-4289-A639-24AB57ED082D" isCollapsed="false"
isListedInputData="false">
+ <dc:Bounds x="620" y="-20" width="160" height="80" />
+ </dmndi:DMNShape>
+ <dmndi:DMNShape id="_CC5CFF75-4E2D-4B09-BA95-FD51EE4BAAAB"
dmnElementRef="_09186183-0646-4CD0-AD67-A159E9F87F5E" isCollapsed="false"
isListedInputData="false">
+ <dc:Bounds x="320" y="240" width="160" height="80" />
+ </dmndi:DMNShape>
+ <dmndi:DMNEdge id="_B7A4C183-976B-4578-92E7-5AF0759E9158"
dmnElementRef="_B27B7577-2FF5-47C9-8693-FAEECEE52EFB"
sourceElement="_CC5CFF75-4E2D-4B09-BA95-FD51EE4BAAAB"
targetElement="_2AE7DDAE-7164-4079-BFB1-D3D64EDCDE1D">
+ <di:waypoint x="400" y="280" />
+ <di:waypoint x="400" y="60" />
+ </dmndi:DMNEdge>
+ <dmndi:DMNShape id="_8E12F39F-A1C2-4FB8-A501-49E91BFDE5A4"
dmnElementRef="_ED8D803B-1CE0-4BBF-B515-FFD98FD8BF21" isCollapsed="false"
isListedInputData="false">
+ <dc:Bounds x="620" y="240" width="160" height="80" />
+ </dmndi:DMNShape>
+ <dmndi:DMNEdge id="_0DDFB6F2-F49C-4D2A-9550-D87D0B87A23B"
dmnElementRef="_5848A89D-BEED-4BCC-AFC5-EB2D96AE2A9F"
sourceElement="_8E12F39F-A1C2-4FB8-A501-49E91BFDE5A4"
targetElement="_E4AF0974-016B-427B-B3B7-D61CBE26FD14">
+ <di:waypoint x="700" y="280" />
+ <di:waypoint x="700" y="60" />
+ </dmndi:DMNEdge>
+ <dmndi:DMNShape id="_E0821EF3-39D4-40B3-9AF0-84BB63BAA6E9"
dmnElementRef="_75C34B3D-3B34-4E4A-97FE-BC349E436384" isCollapsed="false"
isListedInputData="false">
+ <dc:Bounds x="960" y="240" width="160" height="80" />
+ </dmndi:DMNShape>
+ <dmndi:DMNEdge id="_C53BF307-1AF2-4643-A330-AC7F5DCB7874"
dmnElementRef="_35609EBD-709A-4130-BFF9-826AA6FB605F"
sourceElement="_10BB430B-C3BB-4787-8BD3-C16902638A42"
targetElement="_2AE7DDAE-7164-4079-BFB1-D3D64EDCDE1D">
+ <di:waypoint x="140" y="20" />
+ <di:waypoint x="320" y="20" />
+ </dmndi:DMNEdge>
+ <dmndi:DMNShape id="_12F67582-B006-4EA7-9483-0812FBF59743"
dmnElementRef="_E9468D45-51EB-48DA-8B30-7D65696FDFB8" isCollapsed="false"
isListedInputData="false">
+ <dc:Bounds x="960" y="-20" width="160" height="80" />
+ </dmndi:DMNShape>
+ <dmndi:DMNEdge id="_E53F65D7-6626-4B65-BDC9-2938470BF223"
dmnElementRef="_5CA9FF49-53D6-4531-BD54-A83FE0517FA5"
sourceElement="_E0821EF3-39D4-40B3-9AF0-84BB63BAA6E9"
targetElement="_12F67582-B006-4EA7-9483-0812FBF59743">
+ <di:waypoint x="1040" y="280" />
+ <di:waypoint x="1040" y="60" />
+ </dmndi:DMNEdge>
+ </dmndi:DMNDiagram>
+ </dmndi:DMNDI>
+</definitions>
diff --git
a/kie-dmn/kie-dmn-test-resources/src/test/resources/invalid_models/DMNv1_5/InvalidElementPath.dmn
b/kie-dmn/kie-dmn-test-resources/src/test/resources/invalid_models/DMNv1_5/InvalidElementPath.dmn
new file mode 100644
index 0000000000..c79f803c62
--- /dev/null
+++
b/kie-dmn/kie-dmn-test-resources/src/test/resources/invalid_models/DMNv1_5/InvalidElementPath.dmn
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<definitions xmlns="https://www.omg.org/spec/DMN/20230324/MODEL/"
expressionLanguage="https://www.omg.org/spec/DMN/20230324/FEEL/"
namespace="https://kie.org/dmn/_608570C5-8344-42B6-9538-6E0EA9892C38"
id="_24796CCF-E334-49B8-B79F-A4C5DC46822C"
name="DMN_039CBA90-29EC-4A15-B376-FC0FBC5F6807"
xmlns:dmndi="https://www.omg.org/spec/DMN/20230324/DMNDI/"
xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/"
xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/"
xmlns:kie="https://kie.org/dmn/extens [...]
+ <decision name="Decision2" id="_4FF85EFF-B9E6-41C3-9115-DC9690E3B6F7">
+ <variable name="Decision2" id="_D98D2DEA-4071-49E7-99AB-D115444700EC" />
+ <informationRequirement id="_7D472AB5-D6A5-41A7-AE8E-4D2D8DCA4AA4">
+ <requiredInput href="#_D00472B8-B95C-4F38-B70D-CC1AE12D771D" />
+ </informationRequirement>
+ </decision>
+ <decision name="Decision1" id="_172F9901-0884-47C1-A5B4-3C09CC83D5B6">
+ <variable name="Decision1" id="_CD40777C-C02D-4DB8-975F-F9D3CF1E38B6"
typeRef="number" />
+ <informationRequirement id="_A7EB183C-839F-4A86-955A-7E876FD56193">
+ <requiredInput href="#_D00472B8-B95C-4F38-B70D-CC1AE12D771D" />
+ </informationRequirement>
+ <literalExpression id="_8577FE15-1512-4BBE-885F-C30FD73ADC6B"
typeRef="number" label="Decision1">
+ <text>round up(New Input Data, 120000)</text>
+ </literalExpression>
+ </decision>
+ <inputData name="New Input Data" id="_D00472B8-B95C-4F38-B70D-CC1AE12D771D">
+ <variable name="New Input Data" id="_10346C98-8C57-462E-B80F-998D1083F2EE"
typeRef="number" />
+ </inputData>
+ <dmndi:DMNDI>
+ <dmndi:DMNDiagram id="_3B2FCE0D-4160-4C50-96B7-EDE5C4F50F83" name="Default
DRD" useAlternativeInputDataShape="false">
+ <di:extension>
+ <kie:ComponentsWidthsExtension>
+ <kie:ComponentWidths
dmnElementRef="_8577FE15-1512-4BBE-885F-C30FD73ADC6B">
+ <kie:width>190</kie:width>
+ </kie:ComponentWidths>
+ </kie:ComponentsWidthsExtension>
+ </di:extension>
+ <dmndi:DMNShape id="_6D4D87C2-D745-432B-9CFB-182AEEA75A9C"
dmnElementRef="_4FF85EFF-B9E6-41C3-9115-DC9690E3B6F7" isCollapsed="false"
isListedInputData="false">
+ <dc:Bounds x="600" y="320" width="160" height="80" />
+ </dmndi:DMNShape>
+ <dmndi:DMNShape id="_E09A8BB5-7BF6-4C51-851F-16C7AF1541F2"
dmnElementRef="_172F9901-0884-47C1-A5B4-3C09CC83D5B6" isCollapsed="false"
isListedInputData="false">
+ <dc:Bounds x="540" y="60" width="160" height="80" />
+ </dmndi:DMNShape>
+ <dmndi:DMNShape id="_E9126004-B6D2-431F-84A0-A8C54F370F19"
dmnElementRef="_D00472B8-B95C-4F38-B70D-CC1AE12D771D" isCollapsed="false"
isListedInputData="false">
+ <dc:Bounds x="280" y="280" width="160" height="80" />
+ </dmndi:DMNShape>
+ <dmndi:DMNEdge id="_25E14412-E0DF-4DC2-B70C-28E6D7A62614"
dmnElementRef="_A7EB183C-839F-4A86-955A-7E876FD56193"
sourceElement="_E9126004-B6D2-431F-84A0-A8C54F370F19"
targetElement="_E09A8BB5-7BF6-4C51-851F-16C7AF1541F2">
+ <di:waypoint x="360" y="320" />
+ <di:waypoint x="540" y="100" />
+ </dmndi:DMNEdge>
+ <dmndi:DMNEdge id="_5C50E8F1-5520-4F16-90A3-D68F60B3DA56"
dmnElementRef="_7D472AB5-D6A5-41A7-AE8E-4D2D8DCA4AA4"
sourceElement="_E9126004-B6D2-431F-84A0-A8C54F370F19"
targetElement="_6D4D87C2-D745-432B-9CFB-182AEEA75A9C">
+ <di:waypoint x="360" y="320" />
+ <di:waypoint x="600" y="360" />
+ </dmndi:DMNEdge>
+ </dmndi:DMNDiagram>
+ </dmndi:DMNDI>
+</definitions>
diff --git
a/kie-dmn/kie-dmn-trisotech/src/test/java/org/kie/dmn/trisotech/core/DMN14ExpressionsTest.java
b/kie-dmn/kie-dmn-trisotech/src/test/java/org/kie/dmn/trisotech/core/DMN14ExpressionsTest.java
index a46a0db680..2e87a2c815 100644
---
a/kie-dmn/kie-dmn-trisotech/src/test/java/org/kie/dmn/trisotech/core/DMN14ExpressionsTest.java
+++
b/kie-dmn/kie-dmn-trisotech/src/test/java/org/kie/dmn/trisotech/core/DMN14ExpressionsTest.java
@@ -1,4 +1,4 @@
-/**
+/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -130,7 +130,7 @@ public class DMN14ExpressionsTest {
public void conditionalNonBooleanIf(final TestStrategy testConfig) throws
Throwable {
initDMN14ExpressionsTest(testConfig);
DMNResult results = runtime.evaluateByName(model, new
DMNContextImpl(), "Non boolean");
- assertThat(results.getMessages()).hasSize(1);
+ assertThat(results.getMessages()).hasSize(2);
assertThat(results.getMessages().iterator().next().getMessageType()).isEqualTo(DMNMessageType.ERROR_EVAL_NODE);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]