private void appendToJobContext(String exitStatus) {
   String es = jobCtx.getExitStatus();
   if (es == null) {
     logger.fine("First addition to Job ExitStatus = " + es);
     jobCtx.setExitStatus(exitStatus);
   } else {
     String newExitStatus = es.concat(",").concat(exitStatus);
     logger.fine("Existing Job ExitStatus = " + es + " ; Updating to : " + newExitStatus);
     jobCtx.setExitStatus(newExitStatus);
   }
 }
  @Override
  public String process() throws Exception {

    Properties properties = JobCtx.getProperties();
    String foo = properties.getProperty("foo");

    JobCtx.setExitStatus(foo);

    return GOOD_EXIT_STATUS;
  }
 // Write a custom Exit status
 @Override
 public void onWriteError(List<Object> items, Exception ex) throws Exception {
   log.info("Exception detected. Setting exit status");
   jobContext.setExitStatus("Error : " + ex.getMessage());
 }