From dbef69040fe18ad9408937c78eb469ec5872eddc Mon Sep 17 00:00:00 2001 From: Matt Gilman Date: Fri, 25 May 2018 08:08:50 -0400 Subject: [PATCH] NIFI-5066: - Fixing predicate for finding all processors/ports that can be disabled. This closes #2739. Signed-off-by: Mark Payne --- .../src/main/java/org/apache/nifi/groups/ProcessGroup.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/groups/ProcessGroup.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/groups/ProcessGroup.java index c266c64b60..e9c4d872f8 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/groups/ProcessGroup.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/groups/ProcessGroup.java @@ -75,7 +75,7 @@ public interface ProcessGroup extends ComponentAuthorizable, Positionable, Versi /** * Predicate for disabling eligible Processors. */ - Predicate DISABLE_PROCESSORS_FILTER = node -> !node.isRunning(); + Predicate DISABLE_PROCESSORS_FILTER = node -> !node.isRunning() && !ScheduledState.DISABLED.equals(node.getScheduledState()); /** * Predicate for starting eligible Ports. @@ -95,7 +95,7 @@ public interface ProcessGroup extends ComponentAuthorizable, Positionable, Versi /** * Predicate for disabling eligible Ports. */ - Predicate DISABLE_PORTS_FILTER = port -> !port.isRunning(); + Predicate DISABLE_PORTS_FILTER = port -> !port.isRunning() && !ScheduledState.DISABLED.equals(port.getScheduledState()); /** * @return a reference to this ProcessGroup's parent. This will be