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


##########
kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/ast/DMNDecisionServiceEvaluator.java:
##########
@@ -73,7 +75,14 @@ public EvaluatorResult evaluate(DMNRuntimeEventManager 
eventManager, DMNResult r
         for (String id : decisionIDs) {
             DMNDecisionResult decisionResultById = 
evaluateById.getDecisionResultById(id);
             String decisionName = dmnModel.getDecisionById(id).getName();
-            ctx.put(decisionName, decisionResultById.getResult());
+
+            DMNType expectedType = dsNode.getResultType();
+            Object originalResult = decisionResultById.getResult();
+            Object coercedResult = CoerceUtil.coerceValue(expectedType, 
originalResult);
+            if (coercedResult != originalResult) {

Review Comment:
   HI @AthiraHari77 
   Please check for `null` here. both `originalResult`and `courcedResult` could 
be `null`, IINW



-- 
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]

Reply via email to