code: public void entityProcessComplete(CAS aCas, EntityProcessStatus aStatus) {
  
          // if there is an error above the individual document level,
          // an entityProcessStatus is created with a null value for entity
          if (aCas == null) {
              for (int i = 0; i < aStatus.getFailedComponentNames().size(); i++) {
                  LOG.info("[{}] FailedComponentNames", aStatus
                          .getFailedComponentNames().get(i));
              }
              for (int i = 0; i < aStatus.getExceptions().size(); i++) {
                  LOG.info("[{}] Exceptions", aStatus.getExceptions().get(i));
              }
              return;
          }
          try {
              entityCount++;
              // FIXME int dataSize = 0;
              // // get size here
              // Type t = aCas.getTypeSystem().getType("uima.cpm.FileLocation");
              // Feature f = t.getFeatureByBaseName("DocumentSize");
              // FSIterator fsI = aCas.getAnnotationIndex(t).iterator();
              // if (fsI.isValid()) {
              // dataSize = fsI.get().getIntValue(f);
              // }
              //
              // size += dataSize;
              // to handle exceptions occured in any of the components for the
              // entity
              if (aStatus.isException()) {
                  for (int q = 0; q < aStatus.getExceptions().size(); q++) {
                      Exception e = (Exception) aStatus.getExceptions().get(q);
                      e.printStackTrace();
                  }
              }
          } catch (Exception io) {
              UIMAFramework.getLogger(this.getClass()).log(Level.WARNING, "", io);
          }
      }
docs: Called when the processing of a Document is completed. <br>
  The process status can be looked at and corresponding actions taken.
  
  @param aCas
  CAS corresponding to the completed processing
  @param aStatus
  EntityProcessStatus that holds the status of all the events
  for aEntity