What are asynchronous jobs?
An asynchronous process executes a task "in the background" without the user having to wait for the task to finish. Unlike synchronous processes, which happen in real time, asynchronous processes are often scheduled to begin in the future.
Asynchronous operations are critical to the Full Circle product suite. They improve performance and minimize application's impact on normal processing. Because we know that a customer may have other managed packages, workflow rules, processes, flows, and custom Apex logic that all operate on lead, contact, campaign, campaign member, and opportunity updates, we defer a lot of our application processing to occur “behind the scenes” instead of real-time. Some of these operations include reactivation (especially reactivation that happens on a time delay), sync field updates, and funnel updates.
Most asynchronous operations are performed quickly, but there are two notable exceptions:
- Asynchronous operations where a delay is requested, such as delayed reactivation.
- Asynchronous operations that are applied to multiple records by batch operations, e.g. lead assignments or locked record recovery.
In summary, you need not worry about Full Circle causing problems in your org by running a lot of background processing. In fact, we actually do this to prevent issues.
What is the Scheduled Job and why is it important?
Scheduled jobs are jobs that are triggered by the Response Management scheduler, using the Apex Scheduler. You can see the scheduled job under Setup | Monitor | Jobs | Scheduled Jobs, called "Full Circle Response Management scheduler V3."
The Scheduled Job is designed to run and then re-run certain FCI jobs (FCR_AsyncScheduledEntry & FCR_AsyncScheduledMainV3) every six minutes to pick up any async requests that haven't been run yet. Normally, the Apex job restarts itself, but if a scheduled job stops unexpectedly, it will need to be restarted by the backup monitoring system. Reasons for this include:
- Someone manually stops the Apex job
- A Salesforce platform error occurs relating to scheduled Apex
- An unexpected Apex exception occurs during the scheduled Apex job
Note: This is exceedingly rare
If this Scheduled Apex fails to run, many asynchronous operations will not run and begin to queue up instead. This will cause the system to appear frozen.
What are Asynchronous Profiles & Users?
The backup monitoring system checks the status of the scheduled Apex job any time a Response Management configuration page is updated, and on every trigger. To provide some control over which users start that scheduler, Full Circle uses an asynchronous profile or user. Only async users or users who belong to the designated async profile are allowed to start or restart the scheduled Apex job if it fails to run.
You can find the "Asynchronous Profiles & Users" section on the General Configuration page. Defining an active user ensures that the backup monitoring system works as expected. If you do not add a profile or user in this section, or if the user you have added does not routinely use Full Circle (e.g. a generic user), this redundant system cannot verify that the scheduled job has failed, and asynchronous operations will begin to queue up.
Ideally, the asynchronous profile or user should be:
- Able to view and update all leads, contacts, accounts, opportunities, campaigns, campaign members, and Full Circle custom objects.
- A System Administrator who uses Salesforce on a regular basis.
What is a Scheduled Apex slot?
The Full Circle scheduled job runs as a Scheduled Apex slot. Sometimes, when the Scheduled Job stops running and Response Management attempts to start it again using the asynchronous user or profile (see above), it fails with an error message "No available Scheduled Apex slots." This is because Salesforce has a limit of 100 slots. To solve this issue, you will need to delete slot(s) to get back below 100.
If you encounter this error, follow the directions on this Salesforce support page. A Full Circle-specific solution is offered here.
Looking for something else?
If you're looking for information on asynchronous batch job errors, click here.
If you're looking for information on troubleshooting the scheduler, click here.
If you're looking for general configuration information, click here.
Comments
0 comments
Please sign in to leave a comment.