Package com.veeva.vault.sdk.api.job
Interface JobInitContext
- All Superinterfaces:
JobContext
Context given to
Job.init(JobInitContext)
.-
Method Summary
Modifier and TypeMethodDescriptionnewJobInput
(String query) Allows a VQL query to be used as a Job input.newJobInput
(List<JobItem> items) Allows a List ofJobItem
s to be used as input to a job.Retrieves a newJobItem
object.void
setJobInitParameter
(String name, Object value) Sets the name and value of a job parameter.Methods inherited from interface com.veeva.vault.sdk.api.job.JobContext
getJobId, getJobInitParameter, getJobInitParameter, getJobLogger, getJobName, getJobOwner, getJobParameter, getJobParameter
-
Method Details
-
setJobInitParameter
Sets the name and value of a job parameter.- Parameters:
name
- name of the parameter for which a value will be setvalue
- new value to set on the parameter. Value must be one of the data types specified inJobValueType
OrJobValue
-
newJobInput
Allows a VQL query to be used as a Job input. The query'sSELECT
must contain one or more fields of the following types:- String
- Date
- Boolean
- Number
id
fields for Vault Objects in the query'sSELECT
. All otherid
fields are not supported. Validation only occurs at runtime, after theJob.init(JobInitContext)
method completes. If there are any issues encountered in VQL execution, the job will be marked asERROR_ENCOUNTERED
and errors are logged to the job log file.- Parameters:
query
- VQL query to use as an input- Returns:
- a JobInputSupplier which can be used in a Job init method. Throws RuntimeException if VQL SELECT contains unsupported type.
-
newJobInput
Allows a List ofJobItem
s to be used as input to a job.- Parameters:
items
- specifies the List of items to use as input- Returns:
- a JobInputSupplier which can be used in a Job init method
-
newJobItem
JobItem newJobItem()Retrieves a newJobItem
object.- Returns:
- JobItem object
-