From af6e38f4c6f462cd094700a0d94d16051c594a76 Mon Sep 17 00:00:00 2001 From: Mark Payne Date: Sun, 22 Sep 2024 10:10:17 -0400 Subject: [PATCH] NIFI-13789: Fixed StatelessFlowManager so that it registers any Process Group that it creates in its internal map in the same way that StandardFlowManager does; this ensures that the Process Group can be retrieved by ID during flow synchronization. --- .../apache/nifi/stateless/engine/StatelessFlowManager.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/nifi-stateless/nifi-stateless-bundle/nifi-stateless-engine/src/main/java/org/apache/nifi/stateless/engine/StatelessFlowManager.java b/nifi-stateless/nifi-stateless-bundle/nifi-stateless-engine/src/main/java/org/apache/nifi/stateless/engine/StatelessFlowManager.java index 565857006c81..641b8db99407 100644 --- a/nifi-stateless/nifi-stateless-bundle/nifi-stateless-engine/src/main/java/org/apache/nifi/stateless/engine/StatelessFlowManager.java +++ b/nifi-stateless/nifi-stateless-bundle/nifi-stateless-engine/src/main/java/org/apache/nifi/stateless/engine/StatelessFlowManager.java @@ -76,7 +76,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.net.ssl.SSLContext; import java.net.URL; import java.util.ArrayList; import java.util.Collection; @@ -86,6 +85,7 @@ import java.util.Set; import java.util.concurrent.TimeUnit; import java.util.function.BooleanSupplier; +import javax.net.ssl.SSLContext; import static java.util.Objects.requireNonNull; @@ -221,7 +221,7 @@ public Port createLocalOutputPort(final String id, final String name) { @Override public ProcessGroup createProcessGroup(final String id) { - return new StandardProcessGroup(id, statelessEngine.getControllerServiceProvider(), + final ProcessGroup created = new StandardProcessGroup(id, statelessEngine.getControllerServiceProvider(), statelessEngine.getProcessScheduler(), statelessEngine.getPropertyEncryptor(), statelessEngine.getExtensionManager(), @@ -232,6 +232,9 @@ public ProcessGroup createProcessGroup(final String id) { null, group -> null, statelessEngine.getAssetManager()); + + onProcessGroupAdded(created); + return created; } @Override