code: private Map<Optional<Executor>, List<ExecutableFlow>> getFlowToExecutorMap() {
      final HashMap<Optional<Executor>, List<ExecutableFlow>> exFlowMap =
          new HashMap<>();
  
      for (final Pair<ExecutionReference, ExecutableFlow> runningFlow : this.runningExecutions.get()
          .values()) {
        final ExecutionReference ref = runningFlow.getFirst();
        final ExecutableFlow flow = runningFlow.getSecond();
        final Optional<Executor> executor = ref.getExecutor();
  
        // We can set the next check time to prevent the checking of certain
        // flows.
        if (ref.getNextCheckTime() >= DateTime.now().getMillis()) {
          continue;
        }
  
        List<ExecutableFlow> flows = exFlowMap.get(executor);
        if (flows == null) {
          flows = new ArrayList<>();
          exFlowMap.put(executor, flows);
        }
  
        flows.add(flow);
      }
  
      return exFlowMap;
    }
docs: /* Group Executable flow by Executors to reduce number of REST calls