From 3db4514235a25649f8e580c46115135ae6a5ee96 Mon Sep 17 00:00:00 2001 From: Gabriele-Cardosi Date: Tue, 8 Oct 2024 10:43:49 +0200 Subject: [PATCH] [incubator-kie-issues#1497] Defining NodeInstanceContainer.getSerializableNodeInstances to be used during serialization --- .../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.