code: private boolean isFlowRunningHelper(final int projectId, final String flowId,
        final Collection<Pair<ExecutionReference, ExecutableFlow>> collection) {
      for (final Pair<ExecutionReference, ExecutableFlow> ref : collection) {
        if (ref.getSecond().getProjectId() == projectId
            && ref.getSecond().getFlowId().equals(flowId)) {
          return true;
        }
      }
      return false;
    }
docs: /* Search a running flow in a collection