code: public boolean createJob(String slurmScript, String heronExec,
                             String[] commandArgs, String topologyWorkingDirectory,
                             long containers, String partition) {
      // get the command to run the job on Slurm cluster
      List<String> slurmCmd = slurmCommand(slurmScript, heronExec, containers, partition);
  
      // change the empty strings of command args to "", because batch
      // doesn't recognize space as an arguments
      List<String> transformedArgs = new ArrayList<>();
      for (int i = 0; i < commandArgs.length; i++) {
        String arg = commandArgs[i];
        if (arg == null || arg.trim().equals("")) {
          transformedArgs.add("\"\"");
        } else {
          transformedArgs.add(arg);
        }
      }
  
      // add the args to the command
      slurmCmd.addAll(transformedArgs);
      String[] slurmCmdArray = slurmCmd.toArray(new String[0]);
      LOG.log(Level.INFO, "Executing job [" + topologyWorkingDirectory + "]:",
          Arrays.toString(slurmCmdArray));
      StringBuilder stderr = new StringBuilder();
      boolean ret = runProcess(topologyWorkingDirectory, slurmCmdArray, stderr);
      return ret;
    }
docs: Create a slurm job. Use the slurm scheduler's sbatch command to submit the job.
  sbatch allocates the nodes and runs the script specified by slurmScript.
  This script runs the heron executor on each of the nodes allocated.
  
  @param slurmScript slurm bash script to execute
  @param heronExec the heron executable
  @param commandArgs arguments to the heron executor
  @param topologyWorkingDirectory working directory
  @param containers number of containers required to run the topology
  @param partition the queue to submit the job
  @return true if the job creation is successful