public interface Job extends com.veeva.vault.sdk.infrastructure.core.SdkEntryPoint<JobContext>
JobService to start a Job with the Vault Java SDK.| Modifier and Type | Method and Description |
|---|---|
void |
completeWithError(JobCompletionContext context)
Contains the logic to execute for a job which did not complete successfully.
|
void |
completeWithSuccess(JobCompletionContext context)
Contains the logic to execute for a job which completed successfully.
|
JobInputSupplier |
init(JobInitContext context)
Initializes the
JobInputSupplier. |
void |
process(JobProcessContext context)
Processes the
Job. |
JobInputSupplier init(JobInitContext context)
JobInputSupplier.
The returned JobInputSupplier object contains a list of JobItems separated into smaller chunks of
data called JobTasks.
These JobInputSupplier objects can be retrieved through JobInitContext.newJobInput(java.lang.String).
You cannot call this method before the job has started.
context - JobInitContext object which contains the parameters of this Jobvoid process(JobProcessContext context)
Job. Job logic is implemented inside this method. This method will run once per
JobTask.
Calls to this method may be executed in parallel across chunks, so sequence is not guaranteed.
Each process call will be given a smaller chunk of data through JobProcessContext.getCurrentTask().
You cannot call this method before calling init(JobInitContext).
context - JobProcessContext object containing the chunk of work to processvoid completeWithSuccess(JobCompletionContext context)
This method is only called if all tasks are processed and have a TaskState of SUCCESS.
context - a JobCompletionContext object containing a JobResult objectvoid completeWithError(JobCompletionContext context)
This method is only called if all tasks are processed and one or more tasks has a TaskState of
ERRORS_ENCOUNTERED.
context - a JobCompletionContext object containing a JobResult objectCopyright © Veeva Systems 2017–2022. All rights reserved.