jomarko commented on code in PR #2942:
URL:
https://github.com/apache/incubator-kie-tools/pull/2942#discussion_r1977405837
##########
packages/online-editor/src/dmnRunner/DmnRunnerContextProvider.tsx:
##########
@@ -119,6 +126,81 @@ function dmnRunnerResultsReducer(dmnRunnerResults:
DmnRunnerResults, action: Dmn
}
}
+/**
+ * This transformation is needed for these reasons:
+ * ### -1- ###
+ * DMN Runner backend return upper case constants: "SUCCEEDED", "FAILED",
"SKIPPED"
+ * DMN Editor code base uses lover case constants: "succeeded", "failed",
"skipped"
+ *
+ * ### -2- ###
+ * DMN Runner backend return evaluationHitIds as Object:
+ * {
+ * _F0DC8923-5FC7-4200-8BD1-461D5F3715CF: 1,
+ * _F0DC8923-5FC7-4200-8BD1-461D5F3713AD: 2
+ * }
+ * DMN Editor code base uses evaluationHitIds as Map<string, number>
+ * [
+ * {
+ * key: "_F0DC8923-5FC7-4200-8BD1-461D5F3715CF,
+ * value: 1
+ * },
+ * {
+ * key: "_F0DC8923-5FC7-4200-8BD1-461D5F3713AD",
+ * value: 2
+ * }
+ * ]
+ *
+ * ### -3- ###
+ * DMN Runner backend return data spilt into junks corresponding to table row
or collection item
+ * DMN Editor want to show aggregated data for everything together
+ *
+ * @param result - DMN Runner backend data
+ * @param evaluationResultsPerNode - transformed data for DMN Editor
+ */
+function transformExtendedServicesDmnResult(
+ result: ExtendedServicesDmnResult,
+ evaluationResultsPerNode: Map<
+ string,
+ { evaluationResult: "succeeded" | "failed" | "skipped";
evaluationHitsCount: Map<string, number> }
+ >
Review Comment:
The issue is `online-editor` has no dependency for `dmn-editor`, only for
the `dmn-editor-envelope`
--
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]