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 the 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 us to process large volumes of data asynchronously.
In this chapter, we are going to learn about the following topics:
- When to use Batch Apex
- Defining Batch Apex
- Invoking Batch Apex
- Monitoring Batch Apex
- Exception handling and platform events