Show:      

Batch_ProcessController

Signature
global class Batch_ProcessController

Batch_ProcessController Methods

schedulebatchMethod(batchInfoId)

schedule the batch according to the Cron statement
Signature
@AuraEnabled
webService static void schedulebatchMethod(Id batchInfoId)
Parameters
batchInfoId
Type: Id
SFDC Id of the BatchInfo record
Example
   cadmus_batch.Batch_ProcessController.schedulebatchMethod('YOUR BATCH ID');

startBatch(batchInfoId)

Starts the batch to generate documents in bulk.
Signature
@AuraEnabled
webService static void startBatch(Id batchInfoId)
Parameters
batchInfoId
Type: Id
SFDC Id of the BatchInfo record
Example
   cadmus_batch.Batch_ProcessController.startBatch('YOUR BATCH ID');

startBatch(batchInfoId, inputMap)

Starts the batch to generate documents in bulk.
Signature
global static void startBatch(Id batchInfoId, Map<String, Object> inputMap)
Parameters
batchInfoId
Type: Id
SFDC Id of the BatchInfo record
inputMap
Type: Map<String, Object>
parameters to pass on and that can be used in the SOQL used for batch input
Example
   Map<String, Object> inputMap = new Map<String, Object>(); 
   //Example with 1 account. 
   //      Example SOQL for Batch Info record: SELECT Id, Name FROM Account WHERE Id IN :accId 
   inputMap.put('accId', 'YOUR ACC ID'); 
 
   //Example for a list of accounts. 
   //      Example SOQL for Batch Info record: SELECT Id, Name FROM Account WHERE Id IN :accounts 
   List<Id> accIds = new List<Id>(); 
   accIds.add('0011i000005ft6AAAQ'); 
   accIds.add('0011i000005ft6BAAQ'); 
 
   inputMap.put('accounts', accIds); 
   cadmus_batch.Batch_ProcessController.startBatch('YOUR BATCH ID', inputMap);