You need to sign in to do that
Don't have an account?
execute() method is not getting called with batch apex.
1. We are executing batch as follows:-
ID batchprocessid1 = Database.executeBatch(new batchAccountsImport(),8);
2. In batchAccountImport code snippet is as follows:-
global class batchAccountsImport implements Database.Batchable<SObject>,Database.AllowsCallouts {
public string soql = 'select id,safariUserId__c, isActive from User where isactive = true and safariUserid__c<>NULL LIMIT 2';
global Database.queryLocator
start(Database.BatchableContext ctx){
return Database.getQueryLocator(soql);
}
global void execute(Database.BatchableContext ctx, List<Sobject> scope){
// code
}
global void finish(Database.BatchableContext ctx) {
// code
}
}
The execute method is not getting called and we are getting the CUMULATIVE_LIMIT_USAGE issue even when the query has been limited to 2 users.
Thanks
Hello nkwan,
Do this:
Best,
Ankit
Mark it as a Solution if it helped you.
How are you debugging this? CUMULATIVE_LIMIT_USAGE just lets you know a summary.
@Taneja - I have tried the solution, but the issue is not resolved.
I have included the debug statement in the execute code, to check if the code is getting executed. And the debug statement is not getting printed.
Can you post all the related logs?
The Operation name in the Developer Console for the actual execute statement will be 'SerialBatchApexrangeChunkHandler'
BTW, is this what the debug log looks like?
The logs are mentionded below:-
You're looking at the wrong log.
Look here: http://i40.tinypic.com/2r6p0ed.png
The highlighted part is where you need to be looking. The Execute part is going to be in one of those SerialBatchApexRangeChunkHandler operations.