Interface IJobController

All Known Implementing Classes:
JobControllerService

public interface IJobController
Provides the Job Controller service interface which orchestrates the job workflow.
Since:
4.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Cancel the job, abandon any Assigned or Saved Tasks and make submission data ready for purging.
    boolean
    Provides a callback to tell the Job controller that the given task submission has been cancelled.
    boolean
    Provides a callback to tell the Job controller that the specified asynchronous action ('Job Async Action') has been completed.
    boolean
    Provides a callback to tell the Job controller that the given task submission has been completed.
    Create a job with the client, initializing the first step and action and put in 'Ready' state.
    Create a job with the submission, initializing the first step and action, and using the given submission and put step action in 'Ready' state.
    boolean
    Return true if the job controller service is enabled and should be processed by the scheduled job.
    boolean
    Pause the job from performing any further processing.
    void
    Process the job when a job action is in a 'Ready' state.
    boolean
    Resume the job to perform further processing.
  • Method Details

    • createJobWithClient

      Job createJobWithClient(Client client)
      Create a job with the client, initializing the first step and action and put in 'Ready' state.
      If the controller is configured to process the job immediately after creation, this method will also process the job before it is returned.
      Parameters:
      client - the client organization which owns the job (required)
      Returns:
      a new job instance
    • createJobWithSubmission

      Job createJobWithSubmission(Submission submission)
      Create a job with the submission, initializing the first step and action, and using the given submission and put step action in 'Ready' state.
      If the controller is configured to process the job immediately after creation, this method will also process the job before it is returned. This can be useful to create an Task assigned to the user who created the job with the initial submission.
      Parameters:
      submission - the initial job submission (required)
      Returns:
      a new job instance
    • processJob

      void processJob(Job job)
      Process the job when a job action is in a 'Ready' state.
      Parameters:
      job - the Job instance to process
    • completedTaskSubmission

      boolean completedTaskSubmission(Submission submission)
      Provides a callback to tell the Job controller that the given task submission has been completed. The job controller should progress the associated task assign action status to 'Completed' and the next task wait action status to 'Ready'.
      Parameters:
      submission - the completed task submission (required)
      Returns:
      true if the submission task was found and associated "Task Assigned" was set to "Completed" or false otherwise
    • cancelledTaskSubmission

      boolean cancelledTaskSubmission(Submission submission)
      Provides a callback to tell the Job controller that the given task submission has been cancelled. The job controller should progress the associated task assign action status to 'Cancelled' and the next task wait action status to 'Ready'.
      Parameters:
      submission - the cancelled task submission (required)
      Returns:
      true if the submission task was found and associated "Task Assigned" was set to "Cancelled" or false otherwise
      Since:
      4.3.0
    • completedJobAsyncAction

      boolean completedJobAsyncAction(String jobActionKey)
      Provides a callback to tell the Job controller that the specified asynchronous action ('Job Async Action') has been completed. The job controller should progress the associated action status to 'Completed' and the next wait action status to 'Ready'.
      Parameters:
      jobActionKey - the unique job action key identifier (required)
      Returns:
      true if the job action was found and set to "Completed" or false otherwise
    • cancelJob

      boolean cancelJob(Job job)
      Cancel the job, abandon any Assigned or Saved Tasks and make submission data ready for purging.
      Parameters:
      job - the job instance to cancel (required)
      Returns:
      true if the job was cancelled, or false if the job was not "In Progress"
    • pausedJob

      boolean pausedJob(Job job)
      Pause the job from performing any further processing.
      Parameters:
      job - the job instance to pause (required)
      Returns:
      true if the job was paused
    • resumeJob

      boolean resumeJob(Job job)
      Resume the job to perform further processing.
      Parameters:
      job - the job instance to pause (required)
      Returns:
      true if the job was resumed
    • isJobControllerEnabled

      boolean isJobControllerEnabled()
      Return true if the job controller service is enabled and should be processed by the scheduled job. This property can be used to prevent a controllers jobs from being processed while some other maintenance action is being performed.
      Returns:
      true if the controller service is enabled