function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Brahim HadiBrahim Hadi 

In case a batch job gets interrupted in the middle of the process (for example due a cut of electricity in the external integration system) will salesforce roll back the transaction and the batch is retriggered again? Does SF support transactions?

Hi,

In case a batch job gets interrupted in the middle of the process (for example due a cut of electricity in the external integration system) will salesforce roll back the transaction and the batch is retriggered again?  
Does SF support transactions?

Thank you in advance,
Brahim
 
Matt McGuireMatt McGuire
Hello,
The batch execution will be rolled back and restarted.  From the documentation (https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_batch_interface.htm):
 
Batch jobs queued before a Salesforce service maintenance downtime remain in the queue. After service downtime ends and when system resources become available, the queued batch jobs are executed. If a batch job was running when downtime occurred, the batch execution is rolled back and restarted after the service comes back up.