Chapter 8: Working with Batch Apex
In Chapter 7, Utilizing Future Methods, we reviewed how we can utilize future methods to process data in different transactions to avoid issues such as mixed DML errors and make long-running callouts. Future methods are still constrained by Governor Limits, which, while slightly more generous than the standard framework, still do not allow large-scale processing of data.
In this chapter, we are going to discuss Batch Apex, a tool within the Apex language designed specifically to allow processing of large volumes of data asynchronously.
In this chapter, we are going to understand the following topics:
- When to use Batch Apex
- Defining Batch Apex
- Invoking Batch Apex
- Monitoring Batch Apex
- Exception handling and platform events