The Transaction Finalizers feature enables you to attach actions, using the System.Finalizer interface, to asynchronous Apex jobs that use the Queueable framework. A specific use case is to design recovery actions when a Queueable job fails.
Sample Use Cases:
1. Retry in FinalizerContext if the queueable job fails
2. Add error log record in FinalizerContext to report on failures
Sample Class:
public class SampleClass implements Finalizer, Queueable {public void execute( QueueableContext ctx ) {
}public void execute( FinalizerContext ctx ) {
String parentJobId = '' + ctx.getAsyncApexJobId();if ( ctx.getResult() == ParentJobResult.SUCCESS) {
System.debug('Parent queueable job [' + parentJobId + '] completed successfully.');
} else {
System.debug( 'Parent queueable job [' + parentJobId + '] failed due to unhandled exception: ' + ctx.getException().getMessage() );
}
}
}
In order to pass pass report filter value in the URL, we have to use fv0, fv1….fvn based the filters used in the report. In the Lightning Web Component state attribute should be used along with Lightning Navigation to pass it. Please check the following code for reference.
Sample Code:
…