code: public static void runPipeline(final CAS cas, final AnalysisEngine... engines)
        throws UIMAException, IOException {
      if (engines.length == 0) {
        return;
      }
      CasIterator casIter = engines[0].processAndOutputNewCASes(cas);
      AnalysisEngine[] enginesRemains = Arrays.copyOfRange(engines, 1, engines.length);
      while (casIter.hasNext()) {
        CAS nextCas = casIter.next();
        runPipeline(nextCas, enginesRemains);
        nextCas.release();
      }
    }
docs: Run a sequence of {@link AnalysisEngine analysis engines} over a {@link CAS}. This method
  does not {@link AnalysisEngine#destroy() destroy} the engines or send them other events like
  {@link AnalysisEngine#collectionProcessComplete()}. This is left to the caller.
  
  @param cas
  the CAS to process
  @param engines
  a sequence of analysis engines to run on the jCas
  @throws UIMAException
  @throws IOException