Class UiPathRunJob

All Implemented Interfaces:
ExtensionPoint, Describable<Publisher>, BuildStep, SimpleBuildStep

public class UiPathRunJob extends Recorder implements SimpleBuildStep
Class responsible for running a job in orchestrator instance provided by the user.
  • Constructor Details

    • UiPathRunJob

      @DataBoundConstructor public UiPathRunJob(String processName, String parametersFilePath, StartProcessDtoJobPriority priority, SelectEntry strategy, SelectEntry jobType, String resultFilePath, Integer timeout, Boolean failWhenJobFails, Boolean waitForJobCompletion, TraceLevel traceLevel, String orchestratorAddress, String orchestratorTenant, String folderName, SelectEntry credentials)
      Data bound constructor which is responsible for setting/saving of the values provided by the user
      Parameters:
      processName - Process Name
      parametersFilePath - The full path to a json input file.
      priority - The priority of job runs. One of the following values: Low, Normal, High. (default Normal)
      strategy - Strategy
      jobType - Type of job which needs to run
      resultFilePath - The full path to a json file or a folder where the result json file will be created.
      timeout - The timeout for job executions in seconds. (default 1800)
      failWhenJobFails - The command fails when at least one job fails. (default true)
      waitForJobCompletion - Wait for job runs completion. (default true)
      traceLevel - The trace logging level. One of the following values: None, Critical, Error, Warning, Information, Verbose. (default None)
      orchestratorAddress - Orchestrator base URL
      orchestratorTenant - Orchestrator tenant
      folderName - Orchestrator folder
      credentials - Orchestrator credentials
  • Method Details

    • getJobType

      public SelectEntry getJobType()
    • setStrategy

      @DataBoundSetter public void setStrategy(SelectEntry strategy)
    • getStrategy

      public SelectEntry getStrategy()
      Returns:
      SelectEntry strategy
    • getCredentials

      public SelectEntry getCredentials()
      Credentials ID, appearing as choice and will be responsible to extract credentials and use for orchestrator connection
      Returns:
      SelectEntry credentials
    • setProcessName

      @DataBoundSetter public void setProcessName(String processName)
    • getProcessName

      public String getProcessName()
      process name
      Returns:
      String processName
    • setPriority

      @DataBoundSetter public void setPriority(StartProcessDtoJobPriority priority)
    • getPriority

      public StartProcessDtoJobPriority getPriority()
      priority
      Returns:
      StartProcessDtoJobPriority priority
    • setParametersFilePath

      @DataBoundSetter public void setParametersFilePath(String parametersFilePath)
    • getParametersFilePath

      public String getParametersFilePath()
      parameters
      Returns:
      String parameters
    • getOrchestratorAddress

      public String getOrchestratorAddress()
      Base orchestrator URL
      Returns:
      String orchestratorAddress
    • getOrchestratorTenant

      public String getOrchestratorTenant()
      Orchestrator Tenant
      Returns:
      String orchestratorTenant
    • getFolderName

      public String getFolderName()
      Orchestrator Folder
      Returns:
      String folderName
    • setFailWhenJobFails

      @DataBoundSetter public void setFailWhenJobFails(Boolean failWhenJobFails)
    • getFailWhenJobFails

      public Boolean getFailWhenJobFails()
    • setWaitForJobCompletion

      @DataBoundSetter public void setWaitForJobCompletion(Boolean waitForJobCompletion)
    • getWaitForJobCompletion

      public Boolean getWaitForJobCompletion()
    • setResultFilePath

      @DataBoundSetter public void setResultFilePath(String resultFilePath)
    • setTraceLevel

      @DataBoundSetter public void setTraceLevel(TraceLevel traceLevel)
    • getTraceLevel

      public TraceLevel getTraceLevel()
      traceLevel
      Returns:
      TraceLevel traceLevel
    • getResultFilePath

      public String getResultFilePath()
    • setTimeout

      @DataBoundSetter public void setTimeout(Integer timeout)
    • getTimeout

      public Integer getTimeout()
    • getRequiredMonitorService

      public BuildStepMonitor getRequiredMonitorService()
      Declares the scope of the synchronization monitor this BuildStep expects from outside. BuildStepMonitor.NONE No external synchronization is performed on this build step. This is the most efficient, and thus the recommended value for newer plugins. Wherever necessary, you can directly use CheckPoints to perform necessary synchronizations.
      Specified by:
      getRequiredMonitorService in interface BuildStep
      Returns:
      BuildStepMonitor BuildStepMonitor.NONE
    • perform

      public void perform(@Nonnull Run<?,?> run, @Nonnull FilePath workspace, @Nonnull EnvVars env, @Nonnull Launcher launcher, @Nonnull TaskListener listener) throws InterruptedException, IOException
      Run this step.
      Specified by:
      perform in interface SimpleBuildStep
      Parameters:
      run - a build this is running as a part of
      workspace - a workspace to use for any file operations
      launcher - a way to start processes
      listener - a place to send output
      Throws:
      InterruptedException - if the step is interrupted
      IOException - if something goes wrong