-
Notifications
You must be signed in to change notification settings - Fork 0
The AsyncActions Class
GitHub Action edited this page Sep 25, 2025
·
5 revisions
The AsyncActions class serves as the central namespace and entry point for the async actions framework. It provides utility methods for creating async actions and contains essential inner classes and interfaces, which are documented elsewhere in this wiki.
Creates a new AsyncAction__c record configured with the specified processor settings and context information.
AsyncAction__c initAction(AsyncActionProcessor__mdt settings, Id relatedRecordId, String data)AsyncAction__c initAction(AsyncActionProcessor__mdt settings, SObject record, String data)AsyncAction__c initAction(AsyncActionProcessor__mdt settings, Id relatedRecordId)AsyncAction__c initAction(AsyncActionProcessor__mdt settings, SObject record)AsyncAction__c initAction(AsyncActionProcessor__mdt settings)
All overloads initialize the action with "Pending" status, set NextEligibleAt__c to current time for immediate processing, and apply configuration from processor settings.
This class contains several inner types that provide core framework functionality:
- AsyncActions.Failure - Standardized error handling and retry logic
- AsyncActions.Processor - Interface that all processors must implement
- AsyncActions.RetryBehavior - Enum defining retry behavior options
- AsyncActions.Status - Enum defining action status values