code: private void waitUntilFlowPreparationFinish() throws InterruptedException {
      final Duration SLEEP_INTERVAL = Duration.ofSeconds(5);
      while (this.preparingFlowCount.intValue() != 0) {
        logger.info(this.preparingFlowCount + " flow(s) is/are still being setup before complete "
            + "deactivation.");
        Thread.sleep(SLEEP_INTERVAL.toMillis());
      }
    }
docs: Wait until ongoing flow preparation work finishes.