From 7e38588752e27022562b9cf2857047ecc2332eef Mon Sep 17 00:00:00 2001 From: Gabriele Cardosi Date: Fri, 18 Oct 2024 12:38:29 +0200 Subject: [PATCH] [incubator-kie-issues#1497] Defining NodeInstanceContainer.getSerializableNodeInstances to be used during serialization (#6116) Co-authored-by: Gabriele-Cardosi --- .../kie/api/runtime/process/NodeInstanceContainer.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/kie-api/src/main/java/org/kie/api/runtime/process/NodeInstanceContainer.java b/kie-api/src/main/java/org/kie/api/runtime/process/NodeInstanceContainer.java index f8a749bc758..c8915cc1e34 100644 --- a/kie-api/src/main/java/org/kie/api/runtime/process/NodeInstanceContainer.java +++ b/kie-api/src/main/java/org/kie/api/runtime/process/NodeInstanceContainer.java @@ -34,6 +34,16 @@ public interface NodeInstanceContainer { */ Collection getNodeInstances(); + /** + * Returns all node instances that are currently active + * within this container and are serializable + * + * @return the list of serializable node instances currently active + */ + default Collection getSerializableNodeInstances() { + return getNodeInstances(); // defaulting to getNodeInstances to avoid breaking + } + /** * Returns the node instance with the given id, or null * if the node instance cannot be found.