Use BatchApexErrorEvent Triggers to Monitor ISV Applications With Example (Salesforce Spring ’21 Release)
Include BatchApexErrorEvent triggers in your managed package to monitor the health of batch jobs and take necessary corrective action without any post-installation steps. Where: This change applies to Lightning Experience and Salesforce Classic. How: The BatchApexErrorEvent object represents a platform event associated with a failing batch Apex execution. To fire this platform event, a batch Apex class declaration must implement the Database.RaisesPlatformEvents interface. A BatchApexErrorEvent platform event is fired when a batch Apex job encounters an unhandled exception. For more details, see Firing Platform Events from Batch Apex in the Apex Developer Guide . The BatchApexErrorEvent object represents a platform event associated with a batch Apex class. This object is available in API version 44.0 and later. If the start , execute , or finish method of a batch Apex job encounters an unhandled exception, a...