public with sharing class APTS_UsageInput_InsertTempRecordsBatch implements Database.Batchable<APTS_UsageInputWrapper> { public List <APTS_UsageInputWrapper> inputList = new List<APTS_UsageInputWrapper>(); public List<EQ_TempSSP1Data__c> tempData = new List<EQ_TempSSP1Data__c>(); list<APTS_UsageInputWrapperData> inputlistData= new list<APTS_UsageInputWrapperData>(); public APTS_UsageInput_InsertTempRecordsBatch(List<APTS_UsageInputWrapper> uirecordsfromloadfile) { inputList = uirecordsfromloadfile; } public Iterable<APTS_UsageInputWrapper> start(Database.BatchableContext BC) { return inputList; } public void execute(Database.BatchableContext info,List<APTS_UsageInputWrapperData> inputlistData) { // insert tempssp1 records integer counter = 1; for (APTS_UsageInputWrapperData record : inputlistData) { tempData.add(new EQ_TempSSP1Data__c(EQ_WorkId__c = inputList.EQ_WorkId, EQ_SourceSystem__c = record.EQ_SourceSystem, EQ_IssueNumber__c = record.EQ_IssueNumber, EQ_ServiceCode__c = record.EQ_ServiceCode, EQ_Quantity__c = record.EQ_Quantity, EQ_QuantityID__c = record.EQ_QuantityID, EQ_RecordKey__c = record.EQ_RecordKey, EQ_LoadMonth__c = system.today())); counter++; } insert tempData; } public void finish(Database.BatchableContext info) { } } Error: Class APTS_UsageInput_InsertTempRecordsBatch must implement the method: void Database.Batchable.execute(Database.BatchableContext, List)
I am trying to pass APTS_UsageInputWrapper wrapper from class to batch.
global class APTS_UsageInputWrapper { global String EQ_WorkId { get; set; } global Integer EQ_Count { get; set; } global Boolean ValidateOnly { get; set; } global List<APTS_UsageInputWrapperData> data { get; set; } }
public class APTS_UsageInputWrapperData { //RefCode public string EQ_IssueNumber { get; set; } //FeeCode public string EQ_ServiceCode { get; set; } public decimal EQ_Quantity { get; set; } public string EQ_QuantityID { get; set; } public string EQ_SourceSystem { get; set; } public string EQ_LoadMonth { get; set; } public string EQ_RecordKey { get; set; } }