Skip to main content
Verify the version tags to ensure you are consuming the intended content or, complete the latest version.

Background processing

Background processing is useful when a process-intensive task or automation is required. Executing tasks in the background allows users to continue the case or other work and improves system scalability and performance.

For example, a company needs users to regularly process and upload batch files to an external content management system. Users need to perform uploads while processing new cases without experiencing delays in performance. In Pega Platform, you can configure a rule to automate file upload activity in the background, either on a different system or at a time of lower utilization. By moving tasks to dedicated nodes or off-peak hours, users can continue to process cases without any impact caused by the uploading operations.

Clusters and nodes

A Pega Platform installation often spans a set of servers called a cluster. Within this cluster, each server, or node, can be designated a node type for specific processing tasks.

Nodes and clusters gif

The system can then allocate background tasks to one node while processing user interactions on a different node. As a result, the system can optimize performance on each node for the types of interactions that the node supports.

Check your knowledge with the following interaction:

Types of background processing

Pega Platform has two options for performing system tasks on objects in the background: queue processors and job schedulers.

Queue processors

A queue processor queues tasks for background processing, identifying which tasks to queue.

  • Tasks can be queued using either a Run in Background automation or the Queue-For-Processing method in an activity.
  • Tasks can be queued immediately or the queue can be delayed.
  • Tasks are defined with an activity that runs on the queued item.

For example, a queue processor is configured to batch process file uploads to a database. When the queue processor is invoked during processing, the task is queued and performed according to the configuration of the queue processor.

queue-processor-example

In the header of Dev Studio, click Create > SysAdmin > Queue Processor to create a queue processor rule. In the following image, click the + icon to learn more about the options and configuration details for queue processors:

On the Queue processor rule form, you may also need to configure the Processing retries section.

  • Max Attempts – The number of attempts to retry a queued process.
  • Initial Delay – The number of minutes before the second attempt of a queued process.
  • Delay Factor – The multiplier for the delay between attempts. For example, if the initial delay is 1 minute and the delay factor is 2, the retries would be 1, 2, 4, 8, and so on, minutes apart.
Note: For more information about configuring a queue processor rule, see Creating a queue processor rule.

Job schedulers

A job scheduler schedules a recurring task that runs at a specified interval and identifies the tasks to process at that time. Job schedulers are most suitable for tasks that recur on a regular basis, such as overnight batch jobs.

For example, a company that wants to prompt a customer to renew their insurance policy requires a process that automatically sends an email one month before an insurance policy is set to expire. You can handle the requirement with a job scheduler configured to run daily to identify all policies that expire in one month.

job-scheduler-example

In the header of Dev Studio, click Create > SysAdmin > Job Scheduler to create a job scheduler rule. In the following image, click the + icons to learn more about the configuration options for job scheduler rules:

Note: For more information about configuring a job scheduler rule, see Creating a job scheduler rule.

Background processing requirements

To enable background processing for an application, select the Include in background processing option on the application rule. Enabling this option for an application updates the System Runtime Context record to include the application when performing background processing tasks. The System Runtime Context automatically manages the resolution of background processes.

For Pega Platform updates, your existing context is migrated from the current ASYNCPROCESSOR requestor type to the System Runtime Context record. When creating a new application with the New Application wizard, the Include in background processing option is enabled by default.

Note: For more information about enabling background processing, see General system settings and Including an application in System Runtime Context.

In the following image, click the + icons to learn more about the requirements to configure a background process:

Check your knowledge with the following interaction:


This Topic is available in the following Module:

If you are having problems with your training, please review the Pega Academy Support FAQs.

Did you find this content helpful?

100% found this content useful

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Academy has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice