Hello.
In BatchJob::runJobStatic, i see that there are situation where "ChangeCompany" doesn't work and go into the enclosing block.
changecompany(batch.Company)
{
// The inner code isn't reachable.
}
...
Why may be the reason to that (Batch.Company has the same values i.e 'aaa' that is sometimes reachable code, and sometimes it doesn't get into the code after changecompany( ...), and it is not the specific company or specific batch-id that has the problem.
).
Thanks :)