Performs multiple batch operations (one after another) on a set of records.
It executes a number of Integration Procedures-based batch jobs in succession. It also supports the pre and post-processing steps on every batch.
For example, you could use it for various group-level (Quote/Order Group) actions to perform different sequential batch jobs on a set of quotes and orders.
Validate and Price:
Validation
Pricing (gets fired once the validation batch-job is finished)
Create and Submit Order:
Create Order (Quote checkout with price:false)
Price Sub-Orders
Submit Order (checkout the orders created in the initial batch)
batchInput expects the list of objects as input. Every individual object represents a single batch job to execute.
Parameter
Required
Description
batchOperationTypeindicates
Required
The name of the batch process.
batchSize
Required
Batch-size configuration for the batch job to run.
className
Required
The corresponding Apex class to invoke for the batch job. This class should extend MSInvokeVIPInBatch and can override start, execute, and finish methods if required.
classParams
Required
The Integration Procedures to execute at different stages of the batch job.
1<li>`vipName` listed in `startVIP` is executed at the start of the batch.</li>23 <li>`executeVIP` is called as part of the execution process.</li>45 <li>`finishVIP` runs during the finish process of the batch.</li>67 <li>Additional VIP-level inputs can be provided in `vipParams`.</li>
Also, `classParams` can contain an additional set of class-level inputs.|
1{2 "isJobStarted": "false",3 "error": "OK",4 "errorLabel" : "Batch Job Failed to Start",5 "message": "Batch job cannot be started as salesforce limit exceeded. Please contact administrator."6}
Process Different Records
This remote action can also support the scenario where the next batch is expected to process a different set of records than the previous one.
For example, in the Create and Submit Order batch, the finish stage of Create-Order and the whole Price and Submit-Order batches should process the new orders created by the previous batch. This is possible by splitting the finish of the Create-Order process into three steps:
Run beforeCtxSwitchFinishVIP.
Perform context switch.
Run afterCtxSwitchFinishVIP.
The corresponding batch-object of the input is shown in the following example.