diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiServiceFacade.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiServiceFacade.java index 445c7ee309..7d0127200e 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiServiceFacade.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiServiceFacade.java @@ -5056,7 +5056,7 @@ public class StandardNiFiServiceFacade implements NiFiServiceFacade { } if (localComponent.getComponentType() == org.apache.nifi.flow.ComponentType.CONTROLLER_SERVICE) { - final String serviceId = ((InstantiatedVersionedControllerService) localComponent).getInstanceIdentifier(); + final String serviceId = localComponent.getInstanceIdentifier(); final ControllerServiceNode serviceNode = controllerServiceDAO.getControllerService(serviceId); final List referencingServices = serviceNode.getReferences().findRecursiveReferences(ControllerServiceNode.class); @@ -5171,6 +5171,7 @@ public class StandardNiFiServiceFacade implements NiFiServiceFacade { dto.setId(connectable.getIdentifier()); dto.setReferenceType(connectable.getConnectableType().name()); dto.setState(connectable.getScheduledState().name()); + dto.setName(connectable.getName()); final String groupId = connectable instanceof RemoteGroupPort ? ((RemoteGroupPort) connectable).getRemoteProcessGroup().getIdentifier() : connectable.getProcessGroupIdentifier(); dto.setProcessGroupId(groupId); diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/FlowUpdateResource.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/FlowUpdateResource.java index 8bfed3c06c..97a23f8492 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/FlowUpdateResource.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/FlowUpdateResource.java @@ -299,6 +299,20 @@ public abstract class FlowUpdateResource 0) { + return true; + } + + return false; + } + /** * Perform the specified flow update */ @@ -318,8 +332,8 @@ public abstract class FlowUpdateResource runningComponents = affectedComponents.stream() - .filter(dto -> stoppableReferenceTypes.contains(dto.getComponent().getReferenceType())) - .filter(dto -> "Running".equalsIgnoreCase(dto.getComponent().getState())) + .filter(entity -> stoppableReferenceTypes.contains(entity.getComponent().getReferenceType())) + .filter(entity -> isActive(entity.getComponent())) .collect(Collectors.toSet()); logger.info("Stopping {} Processors", runningComponents.size());