gitgabrio commented on code in PR #6553:
URL:
https://github.com/apache/incubator-kie-drools/pull/6553#discussion_r2675561238
##########
kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/ast/DMNDTExpressionEvaluator.java:
##########
Review Comment:
Unneeded import, IINW
##########
kie-dmn/kie-dmn-api/src/main/java/org/kie/dmn/api/core/event/AfterEvaluateDecisionTableEvent.java:
##########
@@ -34,6 +34,13 @@ default String getDecisionTableId() {
return null;
}
+ /**
+ * Returns the name of the decision for which this decision table is being
evaluated.
+ * @return the name of the decision associated with decision table
+ */
+
Review Comment:
Unneeded space
##########
kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/impl/DMNRuntimeImpl.java:
##########
@@ -570,6 +575,7 @@ private boolean walkIntoImportScope(DMNResultImpl result,
DMNNode callerNode, DM
private boolean evaluateDecision(DMNContext context, DMNResultImpl result,
DecisionNode d, boolean typeCheck,
boolean strictMode) {
+ eventManager.setCurrentEvaluatingDecisionName(d.getName());
Review Comment:
See previous comment
##########
kie-dmn/kie-dmn-api/src/main/java/org/kie/dmn/api/core/event/AfterEvaluateDecisionTableEvent.java:
##########
@@ -34,6 +34,8 @@ default String getDecisionTableId() {
return null;
}
+ String getDecisionName();
Review Comment:
This comment could be ignored, because those APIs are for our internal usage
only
##########
kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/impl/DMNRuntimeEventManagerImpl.java:
##########
@@ -31,6 +31,8 @@ public class DMNRuntimeEventManagerImpl implements
DMNRuntimeEventManager {
private DMNRuntime dmnRuntime;
+ private String currentEvaluatingDecisionName;
Review Comment:
@AthiraHari77 @yesamer I'm afraid copilot is right here.
Inside kogito applications, it seems that one single DMN runtime is created
at init time, and reused for all invocations
https://github.com/apache/incubator-kie-kogito-runtimes/blob/d8b34f8235211eb8ac35cf620d27f8304c58773a/drools/kogito-dmn/src/main/java/org/kie/kogito/dmn/AbstractDecisionModels.java#L54
##########
kie-dmn/kie-dmn-api/src/main/java/org/kie/dmn/api/core/event/AfterEvaluateDecisionTableEvent.java:
##########
@@ -34,6 +34,13 @@ default String getDecisionTableId() {
return null;
}
+ /**
+ * Returns the name of the decision for which this decision table is being
evaluated.
Review Comment:
👍 👍 👍
##########
kie-dmn/kie-dmn-api/src/main/java/org/kie/dmn/api/core/event/DMNRuntimeEventManager.java:
##########
@@ -57,4 +57,6 @@ public interface DMNRuntimeEventManager {
DMNRuntime getRuntime();
+ String getCurrentEvaluatingDecisionName();
Review Comment:
This comment could be ignored, because those APIs are for our internal usage
only
--
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]