I've read through some other similar posts, and what seems to usually throw this error (Ex: constructor takes 3 args and you've only given it 2) I don't think is the case here.
My constructor only takes 1 arg, and I'm passing it 1 arg, but still hitting the error.
The full message is:
Constructor not defined: [batchablePartnerPortalShare].Constructor(List)
Any ideas as to what I'm missing?
Batch Class Code
global class batchablePartnerPortalShare implements Database.Batchable<sObject>, Database.AllowsCallouts, Database.Stateful {
global Integer recordsProcessed = 0;
global List<String> loanIdsParam;
global String query;
global void batchAccess(List<String> inputLoanIds){
loanIdsParam = inputLoanIds;
query = 'SELECT Id ' +
'FROM LLC_BI__Loan__c ' +
'WHERE Id IN :loanIdsParam';
}
global Database.QueryLocator start(Database.BatchableContext bc) {
return Database.getQueryLocator(query);
}
global void execute(Database.BatchableContext bc, List<LLC_BI__Loan__c> loanListScope){
for(LLC_BI__Loan__c loan : loanListScope){
Map<String, Object> flowInterviewInputMap = new Map<String, Object>();
flowInterviewInputMap.put('inputVariableId', loan.Id);
PPShareFlowHandler.runFlow('test_case_flow', flowInterviewInputMap);
}
}
global void finish(Database.BatchableContext bc){
System.debug(recordsProcessed + ' records processed.');
AsyncApexJob job = [SELECT Id, Status, NumberOfErrors,
JobItemsProcessed,
TotalJobItems, CreatedBy.Email
FROM AsyncApexJob
WHERE Id = :bc.getJobId()];
system.debug('Apex Job -- ' + job);
}
}
Example Anonymous Apex To Trigger the Batch Class
List<String> inputList = new List<String>{'idone', 'idtwo', 'idthree'};
batchablePartnerPortalShare newBatch = new batchablePartnerPortalShare(inputList);
database.executeBatch(newBatch, 5);