jstastny-cz commented on code in PR #4303:
URL: 
https://github.com/apache/incubator-kie-kogito-runtimes/pull/4303#discussion_r3396357565


##########
api/kogito-api/src/main/java/org/kie/kogito/internal/process/workitem/WorkItemRecordParameters.java:
##########
@@ -76,7 +77,45 @@ private static boolean 
shouldRecordParameters(KogitoNodeInstance nodeInstance) {
     }
 
     private static boolean shouldRecordParameters(Node node) {
-        return node != null && 
shouldRecordParameters(node.getMetaData().getOrDefault(RECORD_ARGS, false));
+        if (node == null) {
+            return false;
+        }
+
+        // Check node-level metadata (highest priority)
+        Object nodeValue = node.getMetaData().get(RECORD_ARGS);
+        if (nodeValue != null) {
+            return shouldRecordParameters(nodeValue);
+        }
+
+        // Check process-level metadata by traversing up the container 
hierarchy
+        if (node instanceof KogitoNode kogitoNode) {
+            org.kie.api.definition.process.Process process = 
findProcess(kogitoNode);

Review Comment:
   I suppose we can import the Process class, right, there's no conflict with 
some other, right?



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