You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by "gitgabrio (via GitHub)" <gi...@apache.org> on 2025/09/08 10:09:01 UTC
[PR] [incubator-kie-issues#2084] Updating decisionresult status on strictMode [incubator-kie-drools]
gitgabrio opened a new pull request, #6446:
URL: https://github.com/apache/incubator-kie-drools/pull/6446
Fixes https://github.com/apache/incubator-kie-issues/issues/2084
This PR:
1: introduce the status update if decision result when evaluation is `strictMode` and there are errors in the evaluation itself
2: updated related test
3: modify `DMNMRUntimeUtil` to automatically set the strict/lenient mode when instantiated, based on related System property
<details>
<summary>
How to replicate CI configuration locally?
</summary>
Build Chain tool does "simple" maven build(s), the builds are just Maven commands, but because the repositories relates and depends on each other and any change in API or class method could affect several of those repositories there is a need to use [build-chain tool](https://github.com/kiegroup/github-action-build-chain) to handle cross repository builds and be sure that we always use latest version of the code for each repository.
[build-chain tool](https://github.com/kiegroup/github-action-build-chain) is a build tool which can be used on command line locally or in Github Actions workflow(s), in case you need to change multiple repositories and send multiple dependent pull requests related with a change you can easily reproduce the same build by executing it on Github hosted environment or locally in your development environment. See [local execution](https://github.com/kiegroup/github-action-build-chain#local-execution) details to get more information about it.
</details>
<details>
<summary>
How to retest this PR or trigger a specific build:
</summary>
- for <b>pull request and downstream checks</b>
- Push a new commit to the PR. An empty commit would be enough.
- for a <b>full downstream build</b>
- for <b>github actions</b> job: add the label `run_fdb`
- for <b>Jenkins PR check only</b>
- If you are an ASF committer for KIE podling, login to Jenkins (https://ci-builds.apache.org/job/KIE/job/drools/), go to the specific PR job, and click on `Build Now` button.
</details>
--
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: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [incubator-kie-issues#2084] Updating decisionresult status on strictMode [incubator-kie-drools]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #6446:
URL: https://github.com/apache/incubator-kie-drools/pull/6446#discussion_r2329789140
##########
kie-dmn/kie-dmn-core/src/test/java/org/kie/dmn/core/util/DMNRuntimeUtil.java:
##########
@@ -96,7 +97,7 @@ public static List<DMNMessage> createExpectingDMNMessages(final String resourceN
.filter(DMNMessage.class::isInstance)
.map(DMNMessage.class::cast)
.collect(Collectors.toList());
- assertThat(dmnMessages).isNotEmpty();;
+ assertThat(dmnMessages).isNotEmpty();
Review Comment:
Fixed the double semicolon at the end of the line, which was a syntax error.
##########
kie-dmn/kie-dmn-core/src/test/java/org/kie/dmn/core/DMNInputRuntimeTest.java:
##########
@@ -759,13 +759,13 @@ void errorHandlingWithLenientMode(boolean useExecModelCompiler) {
}
@ParameterizedTest
- @MethodSource("params")
- void errorHandlingWithStrictModeEvaluateAll(boolean useExecModelCompiler) {
- init(useExecModelCompiler);
+ @MethodSource("strictMode")
+ void errorHandlingWithWithoutStrictModeEvaluateAll(boolean strictMode) {
+ init(false, strictMode);
String nameSpace = "https://kie.org/dmn/_79591DB5-1EE1-4CBD-AA5D-2E3EDF31155E";
final DMNRuntime runtime = DMNRuntimeUtil.createRuntime("invalid_models/DMNv1_6/DMN-MultipleInvalidElements" +
".dmn", this.getClass());
- ((DMNRuntimeImpl)runtime).setOption(new RuntimeModeOption(RuntimeModeOption.MODE.STRICT));
+ //((DMNRuntimeImpl)runtime).setOption(new RuntimeModeOption(RuntimeModeOption.MODE.STRICT));
Review Comment:
Remove this commented-out code as the strict mode is now handled automatically via system properties in the test infrastructure.
```suggestion
```
##########
kie-dmn/kie-dmn-core/src/test/java/org/kie/dmn/core/DMNInputRuntimeTest.java:
##########
@@ -774,13 +774,25 @@ void errorHandlingWithStrictModeEvaluateAll(boolean useExecModelCompiler) {
final DMNContext dmnContext = DMNFactory.newContext();
dmnContext.set("id", "_7273EA2E-2CC3-4012-8F87-39E310C8DF3C");
dmnContext.set("Conditional Input", 107);
Review Comment:
[nitpick] The change from integer 8888 to string \"8888\" appears to be intentional for testing type validation, but this change should be documented or explained in the test method name or comments to clarify why this input type was modified.
```suggestion
dmnContext.set("Conditional Input", 107);
// Intentionally set "New Input Data" to a string instead of an integer to test type validation and error handling.
```
--
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: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [incubator-kie-issues#2084] Updating decisionresult status on strictMode [incubator-kie-drools]
Posted by "gitgabrio (via GitHub)" <gi...@apache.org>.
gitgabrio merged PR #6446:
URL: https://github.com/apache/incubator-kie-drools/pull/6446
--
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: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org