Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
Finalizer Interface
Namespace
Usage
The execute method is called on the provided Finalizer instance for every enqueued job that has an attached finalizer. Within the execute method, you can define the actions to be taken at the end of the Queueable job. An instance of System.FinalizerContext is injected by the Apex runtime engine as an argument to the execute method.
Finalizer Methods
The following are methods for Finalizer.
execute(finalizerContext)
Signature
public void execute(System.FinalizerContext finalizerContext)
Parameters
- finalizerContext: Type: FinalizerContext Interface
Return Value
Type: void
Finalizer Example Implementation
For a sample implementation of the System.Finalizer interface, see the Logging Finalizer Example in Transaction Finalizers.