elguardian commented on code in PR #3707:
URL: 
https://github.com/apache/incubator-kie-kogito-runtimes/pull/3707#discussion_r1796718324


##########
jbpm/jbpm-flow/src/main/java/org/jbpm/workflow/instance/node/CompositeNodeInstance.java:
##########
@@ -195,16 +196,25 @@ public void addNodeInstance(final NodeInstance 
nodeInstance) {
             ((NodeInstanceImpl) 
nodeInstance).setId(UUID.randomUUID().toString());
         }
         this.nodeInstances.add(nodeInstance);
+        if (isSerializable(nodeInstance)) {
+            this.serializableNodeInstances.add(nodeInstance);
+        }
     }
 
     @Override
     public void removeNodeInstance(final NodeInstance nodeInstance) {
         this.nodeInstances.remove(nodeInstance);
+        this.serializableNodeInstances.remove(nodeInstance);
     }
 
     @Override
     public Collection<org.kie.api.runtime.process.NodeInstance> 
getNodeInstances() {
-        return new ArrayList<>(getNodeInstances(false));
+        return Collections.unmodifiableCollection(nodeInstances);

Review Comment:
   change not required



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