You can also submit and process approval records asynchronously. For a large number of approval records, you can submit a batch job to process them in the background instead of waiting for the job to finish. 

Asynchronous processing is available for: 

  • Submitting Approval Records
  • Approving or Rejecting Approval Records

You can define a threshold to process the number of records in a synchronous mode. If the number of records to process exceeds the threshold value, the processing is done in an asynchronous manner. You can define the threshold in Sync Approve Request Threshold field in Approval System Properties. 

Synchronous vs Asynchronous Processing of Approval Records

When you submit the approvals in a synchronous mode, you need to wait till all the records are submitted. The screen is not available for use while the processing happens and the screen keeps on auto-refreshing to reflect the status of the number of records processed. 

In an asynchronous mode, a batch job is submitted in the background to process a large number of records. The screen is available for you to work on other records. You will receive an email once all the records are submitted or processed.

To receive the email, you must add the following line in the classic email template name "Async Submission Completed" right after the existing line that references the field "Apttus_Approval_BusinessObjectId_c".

<apex:outputText value="{!relatedTo.Apttus_Approval_BusinessObjectIds_c}" rendered="false" />

The status of the approval requests submitted for processing using the asynchronous mode is set as ***Processing***. This helps you identify the records that are submitted for processing. 

Approvals Administrators need to add ***Processing*** as a picklist value in the Status field of the Approval Request object.