This is an automated email from the ASF dual-hosted git repository.
tiagobento pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie-tools.git
The following commit(s) were added to refs/heads/main by this push:
new cdda96677cc NO-ISSUE: DMN Editor highlights are showing for all Input
Rows of DMN Runner even in Form mode when only a single Input Row is displayed
(#3005)
cdda96677cc is described below
commit cdda96677ccc6c3050e26568705f301a87da9e82
Author: Luiz João Motta <[email protected]>
AuthorDate: Fri Mar 14 17:23:44 2025 -0300
NO-ISSUE: DMN Editor highlights are showing for all Input Rows of DMN
Runner even in Form mode when only a single Input Row is displayed (#3005)
---
.../src/dmnRunner/DmnRunnerContextProvider.tsx | 21 +++++++++++++++++----
1 file changed, 17 insertions(+), 4 deletions(-)
diff --git a/packages/online-editor/src/dmnRunner/DmnRunnerContextProvider.tsx
b/packages/online-editor/src/dmnRunner/DmnRunnerContextProvider.tsx
index e8fa3fe6743..b7a10f933ad 100644
--- a/packages/online-editor/src/dmnRunner/DmnRunnerContextProvider.tsx
+++ b/packages/online-editor/src/dmnRunner/DmnRunnerContextProvider.tsx
@@ -339,7 +339,7 @@ export function DmnRunnerContextProvider(props:
PropsWithChildren<Props>) {
Promise.all(
dmnRunnerInputs.map((dmnRunnerInput) => {
// extendedServicesModelPayload triggers a re-run in this effect
before the jsonSchema values is updated
- // in the useLayoutEffect, making this effect to be triggered with
the previous file dmnRunnerInputs.
+ // in the useLayoutEffect, making this effect to be triggered with
the previous file.
const input = hasJsonSchema.current === false ? {} :
dmnRunnerInput;
return extendedServicesModelPayload(input);
})
@@ -360,7 +360,6 @@ export function DmnRunnerContextProvider(props:
PropsWithChildren<Props>) {
}
const runnerResults: Array<DecisionResult[] | undefined> = [];
- const evaluationResultsByNodeId:
NewDmnEditorTypes.EvaluationResultsByNodeId = new Map();
for (const result of results) {
if (Object.hasOwnProperty.call(result, "details") &&
Object.hasOwnProperty.call(result, "stack")) {
setExtendedServicesError(true);
@@ -368,11 +367,23 @@ export function DmnRunnerContextProvider(props:
PropsWithChildren<Props>) {
}
if (result) {
runnerResults.push(result.decisionResults);
- transformExtendedServicesDmnResult(result,
evaluationResultsByNodeId);
}
}
setDmnRunnerResults({ type: DmnRunnerResultsActionType.DEFAULT,
newResults: runnerResults });
+ const evaluationResultsByNodeId:
NewDmnEditorTypes.EvaluationResultsByNodeId = new Map();
+ if (dmnRunnerMode === DmnRunnerMode.FORM &&
results[currentInputIndex]) {
+ transformExtendedServicesDmnResult(results[currentInputIndex],
evaluationResultsByNodeId);
+ } else {
+ for (const result of results) {
+ if (Object.hasOwnProperty.call(result, "details") &&
Object.hasOwnProperty.call(result, "stack")) {
+ break;
+ }
+ if (result) {
+ transformExtendedServicesDmnResult(result,
evaluationResultsByNodeId);
+ }
+ }
+ }
const newDmnEditorEnvelopeApi = envelopeServer?.envelopeApi as
MessageBusClientApi<NewDmnEditorEnvelopeApi>;
newDmnEditorEnvelopeApi.notifications.newDmnEditor_showDmnEvaluationResults.send(evaluationResultsByNodeId);
})
@@ -382,12 +393,14 @@ export function DmnRunnerContextProvider(props:
PropsWithChildren<Props>) {
});
},
[
- envelopeServer,
props.workspaceFile.extension,
extendedServices.status,
extendedServices.client,
dmnRunnerInputs,
extendedServicesModelPayload,
+ dmnRunnerMode,
+ currentInputIndex,
+ envelopeServer?.envelopeApi,
]
)
);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]