protected void dryRun(int size, boolean complete) {
    for (int i = 0; i < size; i++) {

      if (bean.getStatus() == Status.REQUEST_TERMINATE || bean.getStatus() == Status.TERMINATED) {
        return;
      }
      try {
        Thread.sleep(100);
      } catch (InterruptedException e) {
        logger.error("Dry run sleeping failed", e);
      }
      System.out.println("Dry run : " + bean.getPercentComplete());
      bean.setPercentComplete(i);
      broadcast(bean);
    }

    bean.setStatus(Status.COMPLETE);
    bean.setPercentComplete(100);
    bean.setMessage("Dry run complete (no software run)");
    broadcast(bean);
  }
  @Override
  public final void run() {
    try {
      execute();
      if (out != System.out) {
        out.close();
        out = System.out;
      }
    } catch (Exception ne) {
      ne.printStackTrace(out);
      logger.error("Cannot run process!", ne);

      bean.setStatus(Status.FAILED);
      bean.setMessage(ne.getMessage());
      bean.setPercentComplete(0);
      broadcast(bean);
    }
  }