Re: [PR] Fix DMN TCK unary test 005 returning null instead of expected success [incubator-kie-drools]

2026-01-26 Thread via GitHub


ChinchuAjith commented on code in PR #6556:
URL: 
https://github.com/apache/incubator-kie-drools/pull/6556#discussion_r2730473230


##
kie-dmn/kie-dmn-core/src/test/java/org/kie/dmn/core/DMNDecisionTableRuntimeTest.java:
##
@@ -208,18 +208,51 @@ void decisionTableNonexistingInputErrorMessage(boolean 
useExecModelCompiler) {
 context.set( "Not exists", "Province" );
 context.set( "Number of Branches", BigDecimal.valueOf( 10 ) );
 
-testDecisionTableInvalidInput( context );
+testDecisionTableMissingDependency( context );
 }
 
-private void testDecisionTableInvalidInput(final DMNContext inputContext) {
+private void testDecisionTableInvalidInputLenient(final DMNContext 
inputContext) {
 final DMNRuntime runtime = DMNRuntimeUtil.createRuntime( 
"InvalidInput.dmn", this.getClass() );
 final DMNModel dmnModel = runtime.getModel( 
"http://www.trisotech.com/dmn/definitions/_cdf29af2-959b-4004-8271-82a9f5a62147";,
 "Dessin 1" );
 assertThat(dmnModel).isNotNull();
 
 final DMNResult dmnResult = runtime.evaluateAll( dmnModel, 
inputContext );
+// In lenient mode (default), invalid input values don't generate 
errors
+// The invalid value is set to null and evaluation continues
+assertThat( dmnResult.hasErrors()).isFalse();
+
+final DMNContext result = dmnResult.getContext();
+// Result is defined - evaluation continues with null for invalid input
+assertThat( result.isDefined( "Branches distribution" 
)).isEqualTo(Boolean.TRUE);
+}

Review Comment:
   Test cases added for strict mode



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] Fix DMN TCK unary test 005 returning null instead of expected success [incubator-kie-drools]

2026-01-26 Thread via GitHub


ChinchuAjith commented on code in PR #6556:
URL: 
https://github.com/apache/incubator-kie-drools/pull/6556#discussion_r2730468139


##
kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/lang/impl/EvaluationContextImpl.java:
##
@@ -47,6 +47,7 @@ public class EvaluationContextImpl implements 
EvaluationContext {
 private ClassLoader rootClassLoader;
 private final FEELDialect feelDialect;
 private final DMNVersion dmnVersion;
+private boolean isLenient = true;

Review Comment:
   Yes. Changes done for this



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] Fix DMN TCK unary test 005 returning null instead of expected success [incubator-kie-drools]

2026-01-23 Thread via GitHub


gitgabrio commented on code in PR #6556:
URL: 
https://github.com/apache/incubator-kie-drools/pull/6556#discussion_r2720159119


##
kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/ast/DMNDTExpressionEvaluator.java:
##
@@ -78,7 +77,8 @@ public EvaluatorResult evaluate(DMNRuntimeEventManager dmrem, 
DMNResult dmnr) {
 DMNRuntimeEventManagerUtils.fireBeforeEvaluateDecisionTable( 
dmrem, node.getName(), dt.getName(), dtNodeId, result );
 List paramNames = 
dt.getParameters().get(0).stream().map(Param::getName).toList();
 Object[] params = new Object[paramNames.size()];
-EvaluationContextImpl ctx = 
feel.newEvaluationContext(List.of(events::add), Collections.emptyMap());
+boolean isLenient = 
RuntimeModeOption.MODE.LENIENT.name().equals(((DMNRuntimeImpl) 
dmrem.getRuntime()).getRuntimeModeOption().name());

Review Comment:
   THanks @ChinchuAjith 
   We may simply compare boolean themselves here -> 
   
   `RuntimeModeOption.MODE.LENIENT.equals(((DMNRuntimeImpl) 
dmrem.getRuntime()).getRuntimeModeOption());`



##
kie-dmn/kie-dmn-core/src/test/java/org/kie/dmn/core/impl/DMNContextFEELCtxWrapperTest.java:
##
@@ -173,6 +173,21 @@ public FEELDialect getFEELDialect() {
 public DMNVersion getDMNVersion() {
 return DMNVersion.getLatest();
 }
+
+@Override
+public void enterFrame(int size) {

Review Comment:
   Are those overrides actually needed ?



##
kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/lang/impl/EvaluationContextImpl.java:
##
@@ -47,14 +47,15 @@ public class EvaluationContextImpl implements 
EvaluationContext {
 private ClassLoader rootClassLoader;
 private final FEELDialect feelDialect;
 private final DMNVersion dmnVersion;
-private boolean isLenient = true;
+private boolean isLenient;

Review Comment:
   HI @ChinchuAjith 
   I know it is a slightly tricky task, here, but this solution is still 
somehow flawed.
   We should implement immutability on critical properties so that it would be 
impossible to change them during execution; `isLenient` is one of them (like 
`FELLDialect` and `DMNVersion`)
   If you change `private boolean isLenient` to `private final boolean 
isLenient`, you will see that the code will break, showing a problem in the 
implementation.
   So, I think it would be better to
   1. make that `boolean isLenient`  field  `final`
   2. identify and fix all the errors
   
   Thanks! 🙏 
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] Fix DMN TCK unary test 005 returning null instead of expected success [incubator-kie-drools]

2026-01-23 Thread via GitHub


yesamer commented on code in PR #6556:
URL: 
https://github.com/apache/incubator-kie-drools/pull/6556#discussion_r2720662356


##
kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/lang/impl/EvaluationContextImpl.java:
##
@@ -47,6 +47,7 @@ public class EvaluationContextImpl implements 
EvaluationContext {
 private ClassLoader rootClassLoader;
 private final FEELDialect feelDialect;
 private final DMNVersion dmnVersion;
+private boolean isLenient = true;

Review Comment:
   @ChinchuAjith This seems relevant, can you please double check?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] Fix DMN TCK unary test 005 returning null instead of expected success [incubator-kie-drools]

2026-01-23 Thread via GitHub


Copilot commented on code in PR #6556:
URL: 
https://github.com/apache/incubator-kie-drools/pull/6556#discussion_r2720636089


##
kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/lang/impl/EvaluationContextImpl.java:
##
@@ -47,6 +47,7 @@ public class EvaluationContextImpl implements 
EvaluationContext {
 private ClassLoader rootClassLoader;
 private final FEELDialect feelDialect;
 private final DMNVersion dmnVersion;
+private boolean isLenient = true;

Review Comment:
   `EvaluationContextImpl.current()` clones the context but does not propagate 
the new `isLenient` flag. This means any code using `ctx.current()` (e.g., 
decision table evaluation) will silently revert to the default lenient behavior 
even when strict mode was requested, so strict-mode invalid-input checks won’t 
fire. Copy `isLenient` into the cloned context (and any other cloning/copy 
constructors) to keep mode consistent.



##
kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/ast/DMNDTExpressionEvaluator.java:
##
@@ -78,7 +77,8 @@ public EvaluatorResult evaluate(DMNRuntimeEventManager dmrem, 
DMNResult dmnr) {
 DMNRuntimeEventManagerUtils.fireBeforeEvaluateDecisionTable( 
dmrem, node.getName(), dt.getName(), dtNodeId, result );
 List paramNames = 
dt.getParameters().get(0).stream().map(Param::getName).toList();
 Object[] params = new Object[paramNames.size()];
-EvaluationContextImpl ctx = 
feel.newEvaluationContext(List.of(events::add), Collections.emptyMap());
+boolean isLenient = 
RuntimeModeOption.MODE.LENIENT.name().equals(((DMNRuntimeImpl) 
dmrem.getRuntime()).getRuntimeModeOption().name());
+EvaluationContext ctx = 
feel.newEvaluationContext(List.of(events::add), Collections.emptyMap(), 
isLenient);
 ctx.setPerformRuntimeTypeCheck(((DMNRuntimeImpl) 
dmrem.getRuntime()).performRuntimeTypeCheck(result.getModel()));

Review Comment:
   `isLenient` detection is doing a `name().equals(other.name())` string 
comparison. This is harder to read and more error-prone than directly comparing 
the enum values (or checking for `STRICT`). Consider using a direct enum 
comparison and storing the `(DMNRuntimeImpl) dmrem.getRuntime()` cast in a 
local variable to avoid repeating it.



##
kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/core/v1_1/DMNDecisionTableRuntimeTest.java:
##
@@ -163,7 +163,24 @@ void decisionTableInvalidInputErrorMessage(VariantTestConf 
conf) {
 context.set( "Branches dispersion", "Province" );
 context.set( "Number of Branches", BigDecimal.valueOf( 10 ) );
 
-testDecisionTableInvalidInput( context );
+final DMNRuntime runtime = DMNRuntimeUtil.createRuntime( 
"InvalidInput.dmn", this.getClass() );
+final DMNModel dmnModel = runtime.getModel( 
"http://www.trisotech.com/dmn/definitions/_cdf29af2-959b-4004-8271-82a9f5a62147";,
 "Dessin 1" );
+assertThat(dmnModel).isNotNull();
+
+final DMNResult dmnResult = runtime.evaluateAll( dmnModel, context );
+// In lenient mode, invalid input value is set to null and evaluation 
continues
+assertThat( dmnResult.hasErrors()).isFalse();
+
+final DMNContext result = dmnResult.getContext();
+
+// Verify that the invalid input "Province" (without leading space) 
was coerced to null
+// The decision table should receive null for "Branches dispersion" 
parameter
+// Since Number of Branches = 10 (<10) and Branches dispersion = null 
(doesn't match any specific rule),

Review Comment:
   The explanation comment says `Number of Branches = 10 (<10)`, but `10` is 
not `< 10`. Please correct this (or align it with the actual rule condition) to 
avoid misleading future readers of the test.
   ```suggestion
   // Since Number of Branches = 10 (not <10) and Branches dispersion = 
null (doesn't match any specific rule),
   ```



##
kie-dmn/kie-dmn-core/src/test/java/org/kie/dmn/core/DMNDecisionTableRuntimeTest.java:
##
@@ -208,18 +208,51 @@ void decisionTableNonexistingInputErrorMessage(boolean 
useExecModelCompiler) {
 context.set( "Not exists", "Province" );
 context.set( "Number of Branches", BigDecimal.valueOf( 10 ) );
 
-testDecisionTableInvalidInput( context );
+testDecisionTableMissingDependency( context );
 }
 
-private void testDecisionTableInvalidInput(final DMNContext inputContext) {
+private void testDecisionTableInvalidInputLenient(final DMNContext 
inputContext) {
 final DMNRuntime runtime = DMNRuntimeUtil.createRuntime( 
"InvalidInput.dmn", this.getClass() );
 final DMNModel dmnModel = runtime.getModel( 
"http://www.trisotech.com/dmn/definitions/_cdf29af2-959b-4004-8271-82a9f5a62147";,
 "Dessin 1" );
 assertThat(dmnModel).isNotNull();
 
 final DMNResult dmnResult = runtime.evaluateAll( dmnModel, 
inputCont

Re: [PR] Fix DMN TCK unary test 005 returning null instead of expected success [incubator-kie-drools]

2026-01-22 Thread via GitHub


kie-ci3 commented on PR #6556:
URL: 
https://github.com/apache/incubator-kie-drools/pull/6556#issuecomment-3783508233

   
   **PR job** `#12` was: **UNSTABLE**
   Possible explanation: This should be test failures
   
   
   
   Reproducer
   
   
   
   build-chain build full_downstream  -f 
'https://raw.githubusercontent.com/${AUTHOR:apache}/incubator-kie-kogito-pipelines/${BRANCH:main}/.ci/buildchain-config-pr-cdb.yaml'
 -o 'bc' -p apache/incubator-kie-drools -u 
https://github.com/apache/incubator-kie-drools/pull/6556 --skipParallelCheckout
   
   NOTE: To install the build-chain tool, please refer to 
https://github.com/kiegroup/github-action-build-chain#local-execution
   
   
   
   
   Please look here: 
https://ci-builds.apache.org/job/KIE/job/drools/job/main/job/pullrequest_jobs/job/drools-pr/job/PR-6556/12/display/redirect
   
   **Test results:**
   - PASSED: 24036
   - FAILED: 1
   
   Those are the test failures: 
   
   https://ci-builds.apache.org/job/KIE/job/drools/job/main/job/pullrequest_jobs/job/drools-pr/job/PR-6556/12/testReport/org.kie.dmn.legacy.tests.core.v1_1/DMNDecisionTableHitPolicyTest/simpleDecisionTableHitPolicyUniqueSatisfiesStrictMode(VariantTestConf)[1]/">org.kie.dmn.legacy.tests.core.v1_1.DMNDecisionTableHitPolicyTest.simpleDecisionTableHitPolicyUniqueSatisfiesStrictMode(VariantTestConf)[1]
   Expecting value to be true but was false
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] Fix DMN TCK unary test 005 returning null instead of expected success [incubator-kie-drools]

2026-01-21 Thread via GitHub


kie-ci3 commented on PR #6556:
URL: 
https://github.com/apache/incubator-kie-drools/pull/6556#issuecomment-3782937566

   
   **PR job** `#11` was: **UNSTABLE**
   Possible explanation: This should be test failures
   
   
   
   Reproducer
   
   
   
   build-chain build full_downstream  -f 
'https://raw.githubusercontent.com/${AUTHOR:apache}/incubator-kie-kogito-pipelines/${BRANCH:main}/.ci/buildchain-config-pr-cdb.yaml'
 -o 'bc' -p apache/incubator-kie-drools -u 
https://github.com/apache/incubator-kie-drools/pull/6556 --skipParallelCheckout
   
   NOTE: To install the build-chain tool, please refer to 
https://github.com/kiegroup/github-action-build-chain#local-execution
   
   
   
   
   Please look here: 
https://ci-builds.apache.org/job/KIE/job/drools/job/main/job/pullrequest_jobs/job/drools-pr/job/PR-6556/11/display/redirect
   
   **Test results:**
   - PASSED: 23843
   - FAILED: 1
   
   Those are the test failures: 
   
   https://ci-builds.apache.org/job/KIE/job/drools/job/main/job/pullrequest_jobs/job/drools-pr/job/PR-6556/11/testReport/org.kie.dmn.legacy.tests.core.v1_1/DMNDecisionTableHitPolicyTest/simpleDecisionTableHitPolicyUniqueSatisfiesStrictMode(VariantTestConf)[1]/">org.kie.dmn.legacy.tests.core.v1_1.DMNDecisionTableHitPolicyTest.simpleDecisionTableHitPolicyUniqueSatisfiesStrictMode(VariantTestConf)[1]
   Expecting value to be true but was false
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] Fix DMN TCK unary test 005 returning null instead of expected success [incubator-kie-drools]

2026-01-21 Thread via GitHub


ChinchuAjith commented on code in PR #6556:
URL: 
https://github.com/apache/incubator-kie-drools/pull/6556#discussion_r2715457906


##
kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/ast/DMNLiteralExpressionEvaluator.java:
##
@@ -26,14 +26,15 @@
 
 import org.kie.dmn.api.core.DMNMessage;
 import org.kie.dmn.api.core.DMNResult;
+import org.kie.dmn.api.core.EvaluatorResult;
+import org.kie.dmn.api.core.EvaluatorResult.ResultType;

Review Comment:
   Already in the correct order



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] Fix DMN TCK unary test 005 returning null instead of expected success [incubator-kie-drools]

2026-01-21 Thread via GitHub


ChinchuAjith commented on code in PR #6556:
URL: 
https://github.com/apache/incubator-kie-drools/pull/6556#discussion_r2715453422


##
kie-dmn/kie-dmn-core/src/test/java/org/kie/dmn/core/DMNDecisionTableHitPolicyTest.java:
##
@@ -66,14 +66,15 @@ void simpleDecisionTableHitPolicyUniqueSatisfies(boolean 
useExecModelCompiler) {
 assertThat(dmnModel).isNotNull();
 
 // Risk Category is constrained to "High", "Low", "Medium" and "ASD" 
is not allowed
+// In lenient mode (default), invalid input is set to null and 
evaluation continues
 final DMNContext context = 
getSimpleTableContext(BigDecimal.valueOf(18), "ASD", false);
 final DMNResult dmnResult = runtime.evaluateAll(dmnModel, context);
 final DMNContext result = dmnResult.getContext();
 
-assertThat(result.get("Approval Status")).isNull();
-assertThat(dmnResult.getMessages()).hasSizeGreaterThan(0);
-DMNMessage message = dmnResult.getMessages().iterator().next();
-assertThat(message.getText()).isEqualTo("DMN: RiskCategory='ASD' does 
not match any of the valid values \"High\", \"Low\", \"Medium\" for decision 
table '_0004-simpletable-U'. (DMN id: _0004-simpletable-U, FEEL expression 
evaluation error) ");
+// In lenient mode, the decision table evaluates with null parameter 
and returns a result
+assertThat(result.get("Approval Status")).isEqualTo("Declined");

Review Comment:
   done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] Fix DMN TCK unary test 005 returning null instead of expected success [incubator-kie-drools]

2026-01-21 Thread via GitHub


ChinchuAjith commented on code in PR #6556:
URL: 
https://github.com/apache/incubator-kie-drools/pull/6556#discussion_r2715439442


##
kie-dmn/kie-dmn-core/src/test/java/org/kie/dmn/core/DMNDecisionTableHitPolicyTest.java:
##
@@ -66,14 +66,15 @@ void simpleDecisionTableHitPolicyUniqueSatisfies(boolean 
useExecModelCompiler) {
 assertThat(dmnModel).isNotNull();
 
 // Risk Category is constrained to "High", "Low", "Medium" and "ASD" 
is not allowed
+// In lenient mode (default), invalid input is set to null and 
evaluation continues
 final DMNContext context = 
getSimpleTableContext(BigDecimal.valueOf(18), "ASD", false);
 final DMNResult dmnResult = runtime.evaluateAll(dmnModel, context);
 final DMNContext result = dmnResult.getContext();
 
-assertThat(result.get("Approval Status")).isNull();
-assertThat(dmnResult.getMessages()).hasSizeGreaterThan(0);
-DMNMessage message = dmnResult.getMessages().iterator().next();
-assertThat(message.getText()).isEqualTo("DMN: RiskCategory='ASD' does 
not match any of the valid values \"High\", \"Low\", \"Medium\" for decision 
table '_0004-simpletable-U'. (DMN id: _0004-simpletable-U, FEEL expression 
evaluation error) ");
+// In lenient mode, the decision table evaluates with null parameter 
and returns a result
+assertThat(result.get("Approval Status")).isEqualTo("Declined");
+// No error messages in lenient mode
+assertThat(dmnResult.getMessages()).isEmpty();

Review Comment:
   Added a test satisfies STRICT mode



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] Fix DMN TCK unary test 005 returning null instead of expected success [incubator-kie-drools]

2026-01-21 Thread via GitHub


ChinchuAjith commented on code in PR #6556:
URL: 
https://github.com/apache/incubator-kie-drools/pull/6556#discussion_r2715436154


##
kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/core/v1_1/DMNDecisionTableHitPolicyTest.java:
##
@@ -67,8 +67,9 @@ void 
simpleDecisionTableHitPolicyUniqueSatisfies(VariantTestConf conf) {
 final DMNResult dmnResult = runtime.evaluateAll(dmnModel, context);
 final DMNContext result = dmnResult.getContext();
 
-assertThat(result.get("Approval Status")).isNull();
-assertThat(dmnResult.getMessages()).hasSizeGreaterThan(0);
+// In lenient mode (default), when input doesn't match constraints, 
it's set to null and evaluation continues
+// Rule 4 matches: Age=any(-), RiskCategory=any(-), isAffordable=false 
-> "Declined"
+assertThat(result.get("Approval Status")).isEqualTo("Declined");

Review Comment:
   Done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] Fix DMN TCK unary test 005 returning null instead of expected success [incubator-kie-drools]

2026-01-21 Thread via GitHub


ChinchuAjith commented on code in PR #6556:
URL: 
https://github.com/apache/incubator-kie-drools/pull/6556#discussion_r2715422890


##
kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/core/v1_1/DMNDecisionTableHitPolicyTest.java:
##
@@ -67,8 +67,9 @@ void 
simpleDecisionTableHitPolicyUniqueSatisfies(VariantTestConf conf) {
 final DMNResult dmnResult = runtime.evaluateAll(dmnModel, context);
 final DMNContext result = dmnResult.getContext();
 
-assertThat(result.get("Approval Status")).isNull();
-assertThat(dmnResult.getMessages()).hasSizeGreaterThan(0);
+// In lenient mode (default), when input doesn't match constraints, 
it's set to null and evaluation continues
+// Rule 4 matches: Age=any(-), RiskCategory=any(-), isAffordable=false 
-> "Declined"
+assertThat(result.get("Approval Status")).isEqualTo("Declined");
 }

Review Comment:
   done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] Fix DMN TCK unary test 005 returning null instead of expected success [incubator-kie-drools]

2026-01-21 Thread via GitHub


ChinchuAjith commented on code in PR #6556:
URL: 
https://github.com/apache/incubator-kie-drools/pull/6556#discussion_r2715422495


##
kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/core/v1_1/DMNDecisionTableRuntimeTest.java:
##
@@ -163,7 +163,17 @@ void decisionTableInvalidInputErrorMessage(VariantTestConf 
conf) {
 context.set( "Branches dispersion", "Province" );
 context.set( "Number of Branches", BigDecimal.valueOf( 10 ) );
 
-testDecisionTableInvalidInput( context );
+final DMNRuntime runtime = DMNRuntimeUtil.createRuntime( 
"InvalidInput.dmn", this.getClass() );
+final DMNModel dmnModel = runtime.getModel( 
"http://www.trisotech.com/dmn/definitions/_cdf29af2-959b-4004-8271-82a9f5a62147";,
 "Dessin 1" );
+assertThat(dmnModel).isNotNull();
+
+final DMNResult dmnResult = runtime.evaluateAll( dmnModel, context );
+// In lenient mode, invalid input value is set to null and evaluation 
continues
+assertThat( dmnResult.hasErrors()).isFalse();
+
+final DMNContext result = dmnResult.getContext();
+// A rule matches with null parameter, so result is defined
+assertThat(result.isDefined( "Branches 
distribution")).isEqualTo(Boolean.TRUE);

Review Comment:
   done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] Fix DMN TCK unary test 005 returning null instead of expected success [incubator-kie-drools]

2026-01-21 Thread via GitHub


ChinchuAjith commented on code in PR #6556:
URL: 
https://github.com/apache/incubator-kie-drools/pull/6556#discussion_r2712756543


##
kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/lang/impl/FEELImpl.java:
##
@@ -168,16 +168,16 @@ public Object evaluate(CompiledExpression expr, 
EvaluationContext ctx) {
 /**
  * Creates a new EvaluationContext using this FEEL instance classloader, 
and the supplied parameters listeners and inputVariables
  */
-public EvaluationContextImpl 
newEvaluationContext(Collection listeners, Map inputVariables) {
-return newEvaluationContext(this.classLoader, listeners, 
inputVariables);
+public EvaluationContextImpl 
newEvaluationContext(Collection listeners, Map inputVariables, String runtimeMode ) {
+return newEvaluationContext(this.classLoader, listeners, 
inputVariables, runtimeMode);
 }
 
 /**

Review Comment:
   Done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] Fix DMN TCK unary test 005 returning null instead of expected success [incubator-kie-drools]

2026-01-21 Thread via GitHub


ChinchuAjith commented on code in PR #6556:
URL: 
https://github.com/apache/incubator-kie-drools/pull/6556#discussion_r2712774921


##
kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/lang/impl/FEELImpl.java:
##
@@ -168,16 +168,16 @@ public Object evaluate(CompiledExpression expr, 
EvaluationContext ctx) {
 /**
  * Creates a new EvaluationContext using this FEEL instance classloader, 
and the supplied parameters listeners and inputVariables
  */
-public EvaluationContextImpl 
newEvaluationContext(Collection listeners, Map inputVariables) {
-return newEvaluationContext(this.classLoader, listeners, 
inputVariables);
+public EvaluationContextImpl 
newEvaluationContext(Collection listeners, Map inputVariables, String runtimeMode ) {
+return newEvaluationContext(this.classLoader, listeners, 
inputVariables, runtimeMode);

Review Comment:
   Done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] Fix DMN TCK unary test 005 returning null instead of expected success [incubator-kie-drools]

2026-01-21 Thread via GitHub


ChinchuAjith commented on code in PR #6556:
URL: 
https://github.com/apache/incubator-kie-drools/pull/6556#discussion_r2712774106


##
kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/compiler/DMNFEELHelper.java:
##
@@ -333,7 +334,7 @@ public Queue getFeelEvents() {
 }
 
 public EvaluationContextImpl newEvaluationContext( 
Collection listeners, Map inputVariables) {
-return (( FEELImpl ) feel).newEvaluationContext(listeners, 
inputVariables);
+return (( FEELImpl ) feel).newEvaluationContext(listeners, 
inputVariables, null);

Review Comment:
   Done. created a new overloaded newEvaluationContext method.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] Fix DMN TCK unary test 005 returning null instead of expected success [incubator-kie-drools]

2026-01-21 Thread via GitHub


ChinchuAjith commented on code in PR #6556:
URL: 
https://github.com/apache/incubator-kie-drools/pull/6556#discussion_r2712765614


##
drools-scenario-simulation/drools-scenario-simulation-backend/src/main/java/org/drools/scenariosimulation/backend/expression/DMNFeelExpressionEvaluator.java:
##
@@ -117,7 +117,7 @@ public Either, Boolean> apply(FEEL feel) {
 final FEELEventListener utErrorListener = errorEvent -> 
utEvalErrors.add(errorEvent);
 EvaluationContext evaluationContext = ((FEELImpl) 
feel).newEvaluationContext(List.of(utErrorListener),

  Collections.singletonMap(UNARY_PARAMETER_IDENTIFIER,
-   
   resultValue));
+   
   resultValue), null);

Review Comment:
   Done. Created a new evaluation method.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] Fix DMN TCK unary test 005 returning null instead of expected success [incubator-kie-drools]

2026-01-21 Thread via GitHub


ChinchuAjith commented on code in PR #6556:
URL: 
https://github.com/apache/incubator-kie-drools/pull/6556#discussion_r2712749390


##
kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/lang/impl/FEELImpl.java:
##
@@ -168,16 +168,16 @@ public Object evaluate(CompiledExpression expr, 
EvaluationContext ctx) {
 /**
  * Creates a new EvaluationContext using this FEEL instance classloader, 
and the supplied parameters listeners and inputVariables
  */

Review Comment:
   Changes done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] Fix DMN TCK unary test 005 returning null instead of expected success [incubator-kie-drools]

2026-01-21 Thread via GitHub


ChinchuAjith commented on code in PR #6556:
URL: 
https://github.com/apache/incubator-kie-drools/pull/6556#discussion_r2712322953


##
kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/ast/DMNDTExpressionEvaluator.java:
##
@@ -26,13 +26,12 @@
 
 import org.kie.dmn.api.core.DMNMessage;
 import org.kie.dmn.api.core.DMNResult;
+import org.kie.dmn.api.core.EvaluatorResult;
+import org.kie.dmn.api.core.EvaluatorResult.ResultType;
 import org.kie.dmn.api.core.ast.DMNNode;
-import org.kie.dmn.api.core.ast.DecisionNode;
 import org.kie.dmn.api.core.event.DMNRuntimeEventManager;
 import org.kie.dmn.api.feel.runtime.events.FEELEvent;
 import org.kie.dmn.core.api.DMNExpressionEvaluator;
-import org.kie.dmn.api.core.EvaluatorResult;
-import org.kie.dmn.api.core.EvaluatorResult.ResultType;
 import org.kie.dmn.core.impl.DMNResultImpl;

Review Comment:
   @yesamer I have verified this . The import reorganization is valid and 
complete. The DecisionNode import was unused and correctly removed. The 
reordering maintains logical package grouping. No code changes are needed i 
believe. Please correct me if i am wrong. Same for below similar comments



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] Fix DMN TCK unary test 005 returning null instead of expected success [incubator-kie-drools]

2026-01-21 Thread via GitHub


gitgabrio commented on code in PR #6556:
URL: 
https://github.com/apache/incubator-kie-drools/pull/6556#discussion_r2711470210


##
kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/lang/impl/FEELImpl.java:
##
@@ -168,16 +168,16 @@ public Object evaluate(CompiledExpression expr, 
EvaluationContext ctx) {
 /**
  * Creates a new EvaluationContext using this FEEL instance classloader, 
and the supplied parameters listeners and inputVariables
  */
-public EvaluationContextImpl 
newEvaluationContext(Collection listeners, Map inputVariables) {
-return newEvaluationContext(this.classLoader, listeners, 
inputVariables);
+public EvaluationContextImpl 
newEvaluationContext(Collection listeners, Map inputVariables, String runtimeMode ) {
+return newEvaluationContext(this.classLoader, listeners, 
inputVariables, runtimeMode);

Review Comment:
   Hi @ChinchuAjith . I think it would be better to use the same boolean as per 
EvaluationContext



##
kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/compiler/DMNFEELHelper.java:
##
@@ -333,7 +334,7 @@ public Queue getFeelEvents() {
 }
 
 public EvaluationContextImpl newEvaluationContext( 
Collection listeners, Map inputVariables) {
-return (( FEELImpl ) feel).newEvaluationContext(listeners, 
inputVariables);
+return (( FEELImpl ) feel).newEvaluationContext(listeners, 
inputVariables, null);

Review Comment:
   Hi @ChinchuAjith , thanks for the PR, but I think it would be better to 
avoid usage of `null`. 



##
kie-dmn/kie-dmn-core/src/test/java/org/kie/dmn/core/DMNDecisionTableHitPolicyTest.java:
##
@@ -66,14 +66,15 @@ void simpleDecisionTableHitPolicyUniqueSatisfies(boolean 
useExecModelCompiler) {
 assertThat(dmnModel).isNotNull();
 
 // Risk Category is constrained to "High", "Low", "Medium" and "ASD" 
is not allowed
+// In lenient mode (default), invalid input is set to null and 
evaluation continues
 final DMNContext context = 
getSimpleTableContext(BigDecimal.valueOf(18), "ASD", false);
 final DMNResult dmnResult = runtime.evaluateAll(dmnModel, context);
 final DMNContext result = dmnResult.getContext();
 
-assertThat(result.get("Approval Status")).isNull();
-assertThat(dmnResult.getMessages()).hasSizeGreaterThan(0);
-DMNMessage message = dmnResult.getMessages().iterator().next();
-assertThat(message.getText()).isEqualTo("DMN: RiskCategory='ASD' does 
not match any of the valid values \"High\", \"Low\", \"Medium\" for decision 
table '_0004-simpletable-U'. (DMN id: _0004-simpletable-U, FEEL expression 
evaluation error) ");
+// In lenient mode, the decision table evaluates with null parameter 
and returns a result
+assertThat(result.get("Approval Status")).isEqualTo("Declined");
+// No error messages in lenient mode
+assertThat(dmnResult.getMessages()).isEmpty();

Review Comment:
   @ChinchuAjith please consider that comment 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] Fix DMN TCK unary test 005 returning null instead of expected success [incubator-kie-drools]

2026-01-21 Thread via GitHub


yesamer commented on code in PR #6556:
URL: 
https://github.com/apache/incubator-kie-drools/pull/6556#discussion_r2711421244


##
kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/ast/DMNDTExpressionEvaluator.java:
##
@@ -26,13 +26,12 @@
 
 import org.kie.dmn.api.core.DMNMessage;
 import org.kie.dmn.api.core.DMNResult;
+import org.kie.dmn.api.core.EvaluatorResult;
+import org.kie.dmn.api.core.EvaluatorResult.ResultType;
 import org.kie.dmn.api.core.ast.DMNNode;
-import org.kie.dmn.api.core.ast.DecisionNode;
 import org.kie.dmn.api.core.event.DMNRuntimeEventManager;
 import org.kie.dmn.api.feel.runtime.events.FEELEvent;
 import org.kie.dmn.core.api.DMNExpressionEvaluator;
-import org.kie.dmn.api.core.EvaluatorResult;
-import org.kie.dmn.api.core.EvaluatorResult.ResultType;
 import org.kie.dmn.core.impl.DMNResultImpl;

Review Comment:
   @ChinchuAjith Please consider this comment.



##
drools-scenario-simulation/drools-scenario-simulation-backend/src/main/java/org/drools/scenariosimulation/backend/expression/DMNFeelExpressionEvaluator.java:
##
@@ -117,7 +117,7 @@ public Either, Boolean> apply(FEEL feel) {
 final FEELEventListener utErrorListener = errorEvent -> 
utEvalErrors.add(errorEvent);
 EvaluationContext evaluationContext = ((FEELImpl) 
feel).newEvaluationContext(List.of(utErrorListener),

  Collections.singletonMap(UNARY_PARAMETER_IDENTIFIER,
-   
   resultValue));
+   
   resultValue), null);

Review Comment:
   @ChinchuAjith BAsed on my previous comment, this should be necessary.



##
kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/ast/DMNLiteralExpressionEvaluator.java:
##
@@ -26,14 +26,15 @@
 
 import org.kie.dmn.api.core.DMNMessage;
 import org.kie.dmn.api.core.DMNResult;
+import org.kie.dmn.api.core.EvaluatorResult;
+import org.kie.dmn.api.core.EvaluatorResult.ResultType;

Review Comment:
   
   @ChinchuAjith Please consider this comment.



##
kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/lang/impl/FEELImpl.java:
##
@@ -168,16 +168,16 @@ public Object evaluate(CompiledExpression expr, 
EvaluationContext ctx) {
 /**
  * Creates a new EvaluationContext using this FEEL instance classloader, 
and the supplied parameters listeners and inputVariables
  */

Review Comment:
   @ChinchuAjith I guess this a good suggestion, please consider that. Instead 
of passing "null" as third parameter, you can directly pass the default value 
(LENIENT). 



##
kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/ast/DMNInvocationEvaluator.java:
##
@@ -26,17 +26,18 @@
 import javax.xml.namespace.QName;
 
 import org.kie.dmn.api.core.DMNContext;
+import org.kie.dmn.api.core.DMNMessage;
 import org.kie.dmn.api.core.DMNResult;
 import org.kie.dmn.api.core.DMNType;
-import org.kie.dmn.api.core.EvaluatorResult;
-import org.kie.dmn.api.core.DMNMessage;
 import org.kie.dmn.api.core.DMNVersion;
+import org.kie.dmn.api.core.EvaluatorResult;
+import org.kie.dmn.api.core.EvaluatorResult.ResultType;

Review Comment:
   
   @ChinchuAjith Please consider this comment.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] Fix DMN TCK unary test 005 returning null instead of expected success [incubator-kie-drools]

2026-01-20 Thread via GitHub


Copilot commented on code in PR #6556:
URL: 
https://github.com/apache/incubator-kie-drools/pull/6556#discussion_r2711363419


##
kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/core/v1_1/DMNDecisionTableRuntimeTest.java:
##
@@ -163,7 +163,17 @@ void decisionTableInvalidInputErrorMessage(VariantTestConf 
conf) {
 context.set( "Branches dispersion", "Province" );
 context.set( "Number of Branches", BigDecimal.valueOf( 10 ) );
 
-testDecisionTableInvalidInput( context );
+final DMNRuntime runtime = DMNRuntimeUtil.createRuntime( 
"InvalidInput.dmn", this.getClass() );
+final DMNModel dmnModel = runtime.getModel( 
"http://www.trisotech.com/dmn/definitions/_cdf29af2-959b-4004-8271-82a9f5a62147";,
 "Dessin 1" );
+assertThat(dmnModel).isNotNull();
+
+final DMNResult dmnResult = runtime.evaluateAll( dmnModel, context );
+// In lenient mode, invalid input value is set to null and evaluation 
continues
+assertThat( dmnResult.hasErrors()).isFalse();
+
+final DMNContext result = dmnResult.getContext();
+// A rule matches with null parameter, so result is defined
+assertThat(result.isDefined( "Branches 
distribution")).isEqualTo(Boolean.TRUE);

Review Comment:
   The comment says "In lenient mode, invalid input value is set to null and 
evaluation continues" but there's no explicit test verification that the input 
was actually set to null. The test only checks that a result is defined and no 
errors occurred. Consider adding an assertion to verify the actual mechanism - 
that when an invalid input like "Province" is provided (which doesn't match the 
allowed values), the decision table receives null for that parameter and 
matches the appropriate rule.



##
kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/lang/impl/FEELImpl.java:
##
@@ -168,16 +168,16 @@ public Object evaluate(CompiledExpression expr, 
EvaluationContext ctx) {
 /**
  * Creates a new EvaluationContext using this FEEL instance classloader, 
and the supplied parameters listeners and inputVariables
  */

Review Comment:
   This method signature change breaks backward compatibility. The original 
method `newEvaluationContext(Collection listeners, 
Map inputVariables)` has been changed to add a third parameter 
`String runtimeMode`. This is a breaking API change that could affect external 
consumers of this library. Consider adding a new overloaded method instead to 
maintain backward compatibility.
   ```suggestion
*/
   public EvaluationContextImpl 
newEvaluationContext(Collection listeners, Map inputVariables) {
   return newEvaluationContext(listeners, inputVariables, null);
   }
   
   /**
* Creates a new EvaluationContext using this FEEL instance classloader, 
and the supplied parameters listeners and inputVariables
*/
   ```



##
kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/ast/DMNDTExpressionEvaluator.java:
##
@@ -26,13 +26,12 @@
 
 import org.kie.dmn.api.core.DMNMessage;
 import org.kie.dmn.api.core.DMNResult;
+import org.kie.dmn.api.core.EvaluatorResult;
+import org.kie.dmn.api.core.EvaluatorResult.ResultType;
 import org.kie.dmn.api.core.ast.DMNNode;
-import org.kie.dmn.api.core.ast.DecisionNode;
 import org.kie.dmn.api.core.event.DMNRuntimeEventManager;
 import org.kie.dmn.api.feel.runtime.events.FEELEvent;
 import org.kie.dmn.core.api.DMNExpressionEvaluator;
-import org.kie.dmn.api.core.EvaluatorResult;
-import org.kie.dmn.api.core.EvaluatorResult.ResultType;
 import org.kie.dmn.core.impl.DMNResultImpl;

Review Comment:
   The imports have been reorganized with EvaluatorResult and its nested class 
ResultType moved and DecisionNode import removed. While the removed import for 
DecisionNode appears to be unused in the visible diff, ensure it's not used 
elsewhere in the file. The reordering of imports is cosmetic but consider 
maintaining consistent alphabetical ordering.
   ```suggestion
   
   ```



##
kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/core/v1_1/DMNDecisionTableHitPolicyTest.java:
##
@@ -67,8 +67,9 @@ void 
simpleDecisionTableHitPolicyUniqueSatisfies(VariantTestConf conf) {
 final DMNResult dmnResult = runtime.evaluateAll(dmnModel, context);
 final DMNContext result = dmnResult.getContext();
 
-assertThat(result.get("Approval Status")).isNull();
-assertThat(dmnResult.getMessages()).hasSizeGreaterThan(0);
+// In lenient mode (default), when input doesn't match constraints, 
it's set to null and evaluation continues
+// Rule 4 matches: Age=any(-), RiskCategory=any(-), isAffordable=false 
-> "Declined"
+assertThat(result.get("Approval Status")).isEqualTo("Declined");

Review Comment:
   The comment says "Rule 4 matches: Age=any(-), RiskCategory=any(-), 
isAffordable=false -> Declined" but there's no verification

Re: [PR] Fix DMN TCK unary test 005 returning null instead of expected success [incubator-kie-drools]

2026-01-20 Thread via GitHub


kie-ci3 commented on PR #6556:
URL: 
https://github.com/apache/incubator-kie-drools/pull/6556#issuecomment-3774208787

   
   **PR job** `#8` was: **UNSTABLE**
   Possible explanation: This should be test failures
   
   
   
   Reproducer
   
   
   
   build-chain build full_downstream  -f 
'https://raw.githubusercontent.com/${AUTHOR:apache}/incubator-kie-kogito-pipelines/${BRANCH:main}/.ci/buildchain-config-pr-cdb.yaml'
 -o 'bc' -p apache/incubator-kie-drools -u 
https://github.com/apache/incubator-kie-drools/pull/6556 --skipParallelCheckout
   
   NOTE: To install the build-chain tool, please refer to 
https://github.com/kiegroup/github-action-build-chain#local-execution
   
   
   
   
   Please look here: 
https://ci-builds.apache.org/job/KIE/job/drools/job/main/job/pullrequest_jobs/job/drools-pr/job/PR-6556/8/display/redirect
   
   **Test results:**
   - PASSED: 24034
   - FAILED: 2
   
   Those are the test failures: 
   
   https://ci-builds.apache.org/job/KIE/job/drools/job/main/job/pullrequest_jobs/job/drools-pr/job/PR-6556/8/testReport/org.kie.dmn.legacy.tests.core.v1_1/DMNDecisionTableHitPolicyTest/simpleDecisionTableHitPolicyUniqueSatisfies(VariantTestConf)[1]/">org.kie.dmn.legacy.tests.core.v1_1.DMNDecisionTableHitPolicyTest.simpleDecisionTableHitPolicyUniqueSatisfies(VariantTestConf)[1]
   expected: null but was: "Declined"
   
   
   https://ci-builds.apache.org/job/KIE/job/drools/job/main/job/pullrequest_jobs/job/drools-pr/job/PR-6556/8/testReport/org.kie.dmn.legacy.tests.core.v1_1/DMNDecisionTableRuntimeTest/decisionTableInvalidInputErrorMessage(VariantTestConf)[1]/">org.kie.dmn.legacy.tests.core.v1_1.DMNDecisionTableRuntimeTest.decisionTableInvalidInputErrorMessage(VariantTestConf)[1]
   Expecting value to be true but was false
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] Fix DMN TCK unary test 005 returning null instead of expected success [incubator-kie-drools]

2026-01-20 Thread via GitHub


kie-ci3 commented on PR #6556:
URL: 
https://github.com/apache/incubator-kie-drools/pull/6556#issuecomment-3773328061

   
   **PR job** `#7` was: **UNSTABLE**
   Possible explanation: This should be test failures
   
   
   
   Reproducer
   
   
   
   build-chain build full_downstream  -f 
'https://raw.githubusercontent.com/${AUTHOR:apache}/incubator-kie-kogito-pipelines/${BRANCH:main}/.ci/buildchain-config-pr-cdb.yaml'
 -o 'bc' -p apache/incubator-kie-drools -u 
https://github.com/apache/incubator-kie-drools/pull/6556 --skipParallelCheckout
   
   NOTE: To install the build-chain tool, please refer to 
https://github.com/kiegroup/github-action-build-chain#local-execution
   
   
   
   
   Please look here: 
https://ci-builds.apache.org/job/KIE/job/drools/job/main/job/pullrequest_jobs/job/drools-pr/job/PR-6556/7/display/redirect
   
   **Test results:**
   - PASSED: 24032
   - FAILED: 4
   
   Those are the test failures: 
   
   https://ci-builds.apache.org/job/KIE/job/drools/job/main/job/pullrequest_jobs/job/drools-pr/job/PR-6556/7/testReport/org.kie.dmn.core/DMNDecisionTableHitPolicyTest/simpleDecisionTableHitPolicyUniqueSatisfies(boolean)[1]/">org.kie.dmn.core.DMNDecisionTableHitPolicyTest.simpleDecisionTableHitPolicyUniqueSatisfies(boolean)[1]
   expected: null but was: "Declined"
   
   
   https://ci-builds.apache.org/job/KIE/job/drools/job/main/job/pullrequest_jobs/job/drools-pr/job/PR-6556/7/testReport/org.kie.dmn.core/DMNDecisionTableRuntimeTest/decisionTableInvalidInputErrorMessage(boolean)[1]/">org.kie.dmn.core.DMNDecisionTableRuntimeTest.decisionTableInvalidInputErrorMessage(boolean)[1]
   Expecting value to be true but was false
   
   
   https://ci-builds.apache.org/job/KIE/job/drools/job/main/job/pullrequest_jobs/job/drools-pr/job/PR-6556/7/testReport/org.kie.dmn.legacy.tests.core.v1_1/DMNDecisionTableHitPolicyTest/simpleDecisionTableHitPolicyUniqueSatisfies(VariantTestConf)[1]/">org.kie.dmn.legacy.tests.core.v1_1.DMNDecisionTableHitPolicyTest.simpleDecisionTableHitPolicyUniqueSatisfies(VariantTestConf)[1]
   expected: null but was: "Declined"
   
   
   https://ci-builds.apache.org/job/KIE/job/drools/job/main/job/pullrequest_jobs/job/drools-pr/job/PR-6556/7/testReport/org.kie.dmn.legacy.tests.core.v1_1/DMNDecisionTableRuntimeTest/decisionTableInvalidInputErrorMessage(VariantTestConf)[1]/">org.kie.dmn.legacy.tests.core.v1_1.DMNDecisionTableRuntimeTest.decisionTableInvalidInputErrorMessage(VariantTestConf)[1]
   Expecting value to be true but was false
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] Fix DMN TCK unary test 005 returning null instead of expected success [incubator-kie-drools]

2026-01-20 Thread via GitHub


kie-ci3 commented on PR #6556:
URL: 
https://github.com/apache/incubator-kie-drools/pull/6556#issuecomment-3772610955

   
   **PR job** `#5` was: **UNSTABLE**
   Possible explanation: This should be test failures
   
   
   
   Reproducer
   
   
   
   build-chain build full_downstream  -f 
'https://raw.githubusercontent.com/${AUTHOR:apache}/incubator-kie-kogito-pipelines/${BRANCH:main}/.ci/buildchain-config-pr-cdb.yaml'
 -o 'bc' -p apache/incubator-kie-drools -u 
https://github.com/apache/incubator-kie-drools/pull/6556 --skipParallelCheckout
   
   NOTE: To install the build-chain tool, please refer to 
https://github.com/kiegroup/github-action-build-chain#local-execution
   
   
   
   
   Please look here: 
https://ci-builds.apache.org/job/KIE/job/drools/job/main/job/pullrequest_jobs/job/drools-pr/job/PR-6556/5/display/redirect
   
   **Test results:**
   - PASSED: 20677
   - FAILED: 2
   
   Those are the test failures: 
   
   https://ci-builds.apache.org/job/KIE/job/drools/job/main/job/pullrequest_jobs/job/drools-pr/job/PR-6556/5/testReport/org.kie.dmn.core/DMNDecisionTableHitPolicyTest/simpleDecisionTableHitPolicyUniqueSatisfies(boolean)[1]/">org.kie.dmn.core.DMNDecisionTableHitPolicyTest.simpleDecisionTableHitPolicyUniqueSatisfies(boolean)[1]
   expected: null but was: "Declined"
   
   
   https://ci-builds.apache.org/job/KIE/job/drools/job/main/job/pullrequest_jobs/job/drools-pr/job/PR-6556/5/testReport/org.kie.dmn.core/DMNDecisionTableRuntimeTest/decisionTableInvalidInputErrorMessage(boolean)[1]/">org.kie.dmn.core.DMNDecisionTableRuntimeTest.decisionTableInvalidInputErrorMessage(boolean)[1]
   Expecting value to be true but was false
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] Fix DMN TCK unary test 005 returning null instead of expected success [incubator-kie-drools]

2026-01-20 Thread via GitHub


kie-ci3 commented on PR #6556:
URL: 
https://github.com/apache/incubator-kie-drools/pull/6556#issuecomment-3772137960

   
   **PR job** `#2` was: **UNSTABLE**
   Possible explanation: This should be test failures
   
   
   
   Reproducer
   
   
   
   build-chain build full_downstream  -f 
'https://raw.githubusercontent.com/${AUTHOR:apache}/incubator-kie-kogito-pipelines/${BRANCH:main}/.ci/buildchain-config-pr-cdb.yaml'
 -o 'bc' -p apache/incubator-kie-drools -u 
https://github.com/apache/incubator-kie-drools/pull/6556 --skipParallelCheckout
   
   NOTE: To install the build-chain tool, please refer to 
https://github.com/kiegroup/github-action-build-chain#local-execution
   
   
   
   
   Please look here: 
https://ci-builds.apache.org/job/KIE/job/drools/job/main/job/pullrequest_jobs/job/drools-pr/job/PR-6556/2/display/redirect
   
   **Test results:**
   - PASSED: 24032
   - FAILED: 4
   
   Those are the test failures: 
   
   https://ci-builds.apache.org/job/KIE/job/drools/job/main/job/pullrequest_jobs/job/drools-pr/job/PR-6556/2/testReport/org.kie.dmn.core/DMNDecisionTableHitPolicyTest/simpleDecisionTableHitPolicyUniqueSatisfies(boolean)[1]/">org.kie.dmn.core.DMNDecisionTableHitPolicyTest.simpleDecisionTableHitPolicyUniqueSatisfies(boolean)[1]
   expected: null but was: "Declined"
   
   
   https://ci-builds.apache.org/job/KIE/job/drools/job/main/job/pullrequest_jobs/job/drools-pr/job/PR-6556/2/testReport/org.kie.dmn.core/DMNDecisionTableRuntimeTest/decisionTableInvalidInputErrorMessage(boolean)[1]/">org.kie.dmn.core.DMNDecisionTableRuntimeTest.decisionTableInvalidInputErrorMessage(boolean)[1]
   Expecting value to be true but was false
   
   
   https://ci-builds.apache.org/job/KIE/job/drools/job/main/job/pullrequest_jobs/job/drools-pr/job/PR-6556/2/testReport/org.kie.dmn.legacy.tests.core.v1_1/DMNDecisionTableHitPolicyTest/simpleDecisionTableHitPolicyUniqueSatisfies(VariantTestConf)[1]/">org.kie.dmn.legacy.tests.core.v1_1.DMNDecisionTableHitPolicyTest.simpleDecisionTableHitPolicyUniqueSatisfies(VariantTestConf)[1]
   expected: null but was: "Declined"
   
   
   https://ci-builds.apache.org/job/KIE/job/drools/job/main/job/pullrequest_jobs/job/drools-pr/job/PR-6556/2/testReport/org.kie.dmn.legacy.tests.core.v1_1/DMNDecisionTableRuntimeTest/decisionTableInvalidInputErrorMessage(VariantTestConf)[1]/">org.kie.dmn.legacy.tests.core.v1_1.DMNDecisionTableRuntimeTest.decisionTableInvalidInputErrorMessage(VariantTestConf)[1]
   Expecting value to be true but was false
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] Fix DMN TCK unary test 005 returning null instead of expected success [incubator-kie-drools]

2026-01-20 Thread via GitHub


Copilot commented on code in PR #6556:
URL: 
https://github.com/apache/incubator-kie-drools/pull/6556#discussion_r2707330935


##
drools-scenario-simulation/drools-scenario-simulation-backend/src/main/java/org/drools/scenariosimulation/backend/expression/DMNFeelExpressionEvaluator.java:
##
@@ -117,7 +118,7 @@ public Either, Boolean> apply(FEEL feel) {
 final FEELEventListener utErrorListener = errorEvent -> 
utEvalErrors.add(errorEvent);
 EvaluationContext evaluationContext = ((FEELImpl) 
feel).newEvaluationContext(List.of(utErrorListener),

  Collections.singletonMap(UNARY_PARAMETER_IDENTIFIER,
-   
   resultValue));
+   
   resultValue), "RUNTIME_MODE_LENIENT");

Review Comment:
   The string literal "RUNTIME_MODE_LENIENT" should use the constant 
RUNTIME_MODE_LENIENT instead. The constant is defined on line 55 as "LENIENT", 
but here it's being used as the string literal "RUNTIME_MODE_LENIENT" which 
would be passed as the runtime mode value.
   ```suggestion

 resultValue), RUNTIME_MODE_LENIENT);
   ```



##
kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/runtime/decisiontables/DecisionTableImpl.java:
##
@@ -229,13 +230,21 @@ private Either 
actualInputsMatchInputValues(EvaluationContext
 }
 
 if ( !satisfies ) {
-String values = input.getInputValuesText();
-return Either.ofLeft(new InvalidInputEvent( 
FEELEvent.Severity.ERROR,
-  
input.getInputExpression()+"='" + parameter + "' does not match any of the 
valid values " + values + " for decision table '" + getName() + "'.",
-  getName(),
-  null,
-  values )
-);
+// Check if runtimeMode is "strict" before returning error
+if (ctx instanceof EvaluationContextImpl) {
+String runtimeMode = ((EvaluationContextImpl) 
ctx).getRuntimeMode();
+if (RUNTIME_MODE_STRICT.equalsIgnoreCase(runtimeMode)) 
{

Review Comment:
   The runtime mode string comparison uses equalsIgnoreCase for "strict", but 
the underlying RuntimeModeOption.MODE enum uses lowercase "strict" in its mode 
field. Since the RuntimeModeOption.MODE.name() returns "STRICT" (uppercase) and 
getMode() returns "strict" (lowercase), this creates potential for confusion. 
Consider standardizing on either using the enum's getMode() method or comparing 
against the enum directly rather than string comparisons.
   ```suggestion
   if (RUNTIME_MODE_STRICT.equals(runtimeMode)) {
   ```



##
kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/runtime/decisiontables/DecisionTableImpl.java:
##
@@ -229,13 +230,21 @@ private Either 
actualInputsMatchInputValues(EvaluationContext
 }
 
 if ( !satisfies ) {
-String values = input.getInputValuesText();
-return Either.ofLeft(new InvalidInputEvent( 
FEELEvent.Severity.ERROR,
-  
input.getInputExpression()+"='" + parameter + "' does not match any of the 
valid values " + values + " for decision table '" + getName() + "'.",
-  getName(),
-  null,
-  values )
-);
+// Check if runtimeMode is "strict" before returning error
+if (ctx instanceof EvaluationContextImpl) {
+String runtimeMode = ((EvaluationContextImpl) 
ctx).getRuntimeMode();
+if (RUNTIME_MODE_STRICT.equalsIgnoreCase(runtimeMode)) 
{
+String values = input.getInputValuesText();
+return Either.ofLeft(new InvalidInputEvent( 
FEELEvent.Severity.ERROR,
+  
input.getInputExpression()+"='" + parameter + "' does not match any of the 
valid values " + values + " for decision table '" + getName() + "'.",
+  getName(),
+  null,
+  values )
+);
+  

Re: [PR] Fix DMN TCK unary test 005 returning null instead of expected success [incubator-kie-drools]

2026-01-20 Thread via GitHub


kie-ci3 commented on PR #6556:
URL: 
https://github.com/apache/incubator-kie-drools/pull/6556#issuecomment-3771545904

   
   **PR job** `#1` was: **UNSTABLE**
   Possible explanation: This should be test failures
   
   
   
   Reproducer
   
   
   
   build-chain build full_downstream  -f 
'https://raw.githubusercontent.com/${AUTHOR:apache}/incubator-kie-kogito-pipelines/${BRANCH:main}/.ci/buildchain-config-pr-cdb.yaml'
 -o 'bc' -p apache/incubator-kie-drools -u 
https://github.com/apache/incubator-kie-drools/pull/6556 --skipParallelCheckout
   
   NOTE: To install the build-chain tool, please refer to 
https://github.com/kiegroup/github-action-build-chain#local-execution
   
   
   
   
   Please look here: 
https://ci-builds.apache.org/job/KIE/job/drools/job/main/job/pullrequest_jobs/job/drools-pr/job/PR-6556/1/display/redirect
   
   **Test results:**
   - PASSED: 24032
   - FAILED: 4
   
   Those are the test failures: 
   
   https://ci-builds.apache.org/job/KIE/job/drools/job/main/job/pullrequest_jobs/job/drools-pr/job/PR-6556/1/testReport/org.kie.dmn.core/DMNDecisionTableHitPolicyTest/simpleDecisionTableHitPolicyUniqueSatisfies(boolean)[1]/">org.kie.dmn.core.DMNDecisionTableHitPolicyTest.simpleDecisionTableHitPolicyUniqueSatisfies(boolean)[1]
   expected: null but was: "Declined"
   
   
   https://ci-builds.apache.org/job/KIE/job/drools/job/main/job/pullrequest_jobs/job/drools-pr/job/PR-6556/1/testReport/org.kie.dmn.core/DMNDecisionTableRuntimeTest/decisionTableInvalidInputErrorMessage(boolean)[1]/">org.kie.dmn.core.DMNDecisionTableRuntimeTest.decisionTableInvalidInputErrorMessage(boolean)[1]
   Expecting value to be true but was false
   
   
   https://ci-builds.apache.org/job/KIE/job/drools/job/main/job/pullrequest_jobs/job/drools-pr/job/PR-6556/1/testReport/org.kie.dmn.legacy.tests.core.v1_1/DMNDecisionTableHitPolicyTest/simpleDecisionTableHitPolicyUniqueSatisfies(VariantTestConf)[1]/">org.kie.dmn.legacy.tests.core.v1_1.DMNDecisionTableHitPolicyTest.simpleDecisionTableHitPolicyUniqueSatisfies(VariantTestConf)[1]
   expected: null but was: "Declined"
   
   
   https://ci-builds.apache.org/job/KIE/job/drools/job/main/job/pullrequest_jobs/job/drools-pr/job/PR-6556/1/testReport/org.kie.dmn.legacy.tests.core.v1_1/DMNDecisionTableRuntimeTest/decisionTableInvalidInputErrorMessage(VariantTestConf)[1]/">org.kie.dmn.legacy.tests.core.v1_1.DMNDecisionTableRuntimeTest.decisionTableInvalidInputErrorMessage(VariantTestConf)[1]
   Expecting value to be true but was false
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]