com.sas.hls.job
Interface JobExecutionService


public interface JobExecutionService

Service that provides methods for executing jobs in the repository and in the user's workspace and for getting the status of the submitted job.


Method Summary
 JobStatus getJobSubmissionStatus(JobSubmission jobSubmission)
          Gets the current job submission status for a specific submission of a job.
 JobSubmission submitJobInRepository(String jobPath, String version, Set<ParameterValue> params)
          Submits job in the repository.
 JobSubmission submitJobInWorkspace(String jobPath, Set<ParameterValue> params)
          Submits job in the current user's workspace.
 

Method Detail

submitJobInWorkspace

JobSubmission submitJobInWorkspace(String jobPath,
                                   Set<ParameterValue> params)
                                   throws JobExecutionException,
                                          JobNotFoundException
Submits job in the current user's workspace. All input files and folder locations as well as output folder locations referenced by this job must be available in the user's workspace for the job to execute successfully. The job will run against versions of files that currently exist in the user's workspace.

Parameters:
jobPath - Path of job to submit
params - ParameterValues will override the default value of the JobParameters defined within the job. For parameters of type FILE and FOLDER, the value should be specified as a ResourceSpecification. Values of CHARACTER and NUMERIC parameters should be specified as Strings. Values of DATE parameter type should be specified as java.util.Date. If no parameters are specified, the default values defined in the job will be used.
Returns:
JobSubmission containing information of the submitted job to use as a token to get job submission status
Throws:
JobExecutionException - Thrown if an issue occurred executing the job
JobNotFoundException - Thrown if the job does not exist at the path specified in the workspace

submitJobInRepository

JobSubmission submitJobInRepository(String jobPath,
                                    String version,
                                    Set<ParameterValue> params)
                                    throws JobExecutionException,
                                           JobNotFoundException,
                                           JobVersionNotFoundException
Submits job in the repository. The job execution utilizes an independent transient workspace which is cleaned up after successful completion. Inputs and outputs specified in the job as well as the file or folder locations specified in the job parameter values will be copied into the transient workspace according to the resource specifications provided. Output files will be checked into the repository after the job execution completes successfully.

Parameters:
jobPath - Path of job to submit
version - Version of repository job to run. Specifying null will run the latest version of the job.
params - ParameterValues will override the default value of the JobParameters defined within the job. For parameters of type FILE and FOLDER, the value should be specified as a ResourceSpecification. Values of CHARACTER and NUMERIC parameters should be specified as Strings. Date parameter values should be specified as java.util.Date. If no parameters are specified, the default values in the job will be used.
Returns:
JobSubmission containing information of the submitted job to use as a token to get job submission status
Throws:
JobExecutionException - Thrown if an issue occurred executing the job
JobNotFoundException - Thrown if the job does not exist at the path specified in the repository
JobVersionNotFoundException - Thrown if the version of the job does not exist in the repository

getJobSubmissionStatus

JobStatus getJobSubmissionStatus(JobSubmission jobSubmission)
Gets the current job submission status for a specific submission of a job. The status provides a summary status indicating that the job submission is in progress or has completed. It also provides a detailed status indicating if there were SAS execution errors or warnings, checkin errors or if the job completed successfully. See JobStatus for status details.

Parameters:
jobSubmission - JobSubmission returned from submitting a job.
Returns:
JobStatus which will give you up-to-date information on the current status of the specified job submission


Copyright (c) 2016, SAS Institute Inc., Cary, NC, USA