@Override
  public void dispatch(HarpJob job) {
    // TODO loop through each executable.
    String executableName = job.getExecutablesToRun().get(0);
    System.out.println("Running executable '" + executableName + "' locally.");

    Context context = GroovyRunner.parseHarpScript(job.getConcatenatedScript());

    Executable executableToRun = null;
    for (Executable exec : context.getExecutables()) {
      if (exec.getName().equals(executableName)) {
        executableToRun = exec;
        break;
      }
    }

    if (executableToRun == null) {
      throw new IllegalArgumentException("Executable '" + executableName + "' not found!");
    }

    Executor executor = new LocalExecutor();
    executor.execute(executableToRun, context);
  }