code:     private void verifyNoDescendantsWithLocalModifications(final String action) {
          for (final ProcessGroup descendant : findAllProcessGroups()) {
              final VersionControlInformation descendantVci = descendant.getVersionControlInformation();
              if (descendantVci != null) {
                  final VersionedFlowState flowState = descendantVci.getStatus().getState();
                  final boolean modified = flowState == VersionedFlowState.LOCALLY_MODIFIED || flowState == VersionedFlowState.LOCALLY_MODIFIED_AND_STALE;
  
                  if (modified) {
                      throw new IllegalStateException("Process Group cannot " + action + " because it contains a child or descendant Process Group that is under Version Control and "
                          + "has local modifications. Each descendant Process Group that is under Version Control must first be reverted or have its changes pushed to the Flow Registry before "
                          + "this action can be performed on the parent Process Group.");
                  }
  
                  if (flowState == VersionedFlowState.SYNC_FAILURE) {
                      throw new IllegalStateException("Process Group cannot " + action + " because it contains a child or descendant Process Group that is under Version Control and "
                          + "is not synchronized with the Flow Registry. Each descendant Process Group must first be synchronized with the Flow Registry before this action can be "
                          + "performed on the parent Process Group. NiFi will continue to attempt to communicate with the Flow Registry periodically in the background.");
                  }
              }
          }
      }
  