How To Configure Background Processing – Pega 8

Executing tasks in the background allows for improved scalability and performance. Lets learn about How To Configure Background Processing – Pega 8.

Background Processing:

Here is the quick example about how background processing can help.

  • A rule can be configured to automate file upload activity in the background. By moving tasks to dedicated nodes or off-peak hours, users can continue to process cases without any impact from the uploading operations.
Background Processing in Clusters:
  • A Pega Platform installation often spans a set of servers called a cluster. Within this cluster, each server, or node, can be designated for specific processing tasks.
  • 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 interaction that node supports.

Pega platform provides developers with two options for performing system tasks on objects in the background.

  1. Queue Processor
  2. Job Scheduler
Queue Processor:

The Queue Processor queues tasks for background processing, identifying the tasks to queue.

  • Queue Processor rules replace agent rules with standard configuration.
  • Tasks can be queued using either a Run in Background smart shape or the Queue-For-Processing method in an activity.
  • Tasks can be queued immediately or the queue can be delayed.
  • Run a specified activity on the queued item.

background processing queue processor pega 8

  • Call the Queue Processor in one of the two ways:
    • Use a Run in background step
    • Use the Queue-For-Processing method in an activity
  • The parameters for each option differ depending on whether you use the standard queue processor or a dedicated queue processor.
Job Scheduler:

The Job Scheduler schedules a recurring task.

  • Job Scheduler rules replace agent rules with advanced configuration.
  • it runs at a specified interval.
  • It Identifies the tasks to process at that time.

E:\Pega 8 Learning documents\Application Development\Background Processing\job scheduler background processing pega 8.png

Background process management:

Queue processors and job schedulers can fail to process items correctly for a number of reason. Example: the processes are unable to obtain a lock on an entry because they lack security access or an activity or related class is names incorrectly.

E:\Pega 8 Learning documents\Application Development\Background Processing\queue processor flow for background processing pega.png

Queue processors queue object and then process them.

  • As shown in the above image, if the process fails and the system cannot commit a queue entry, the system puts the entry into failure status and indicates the process is broken.
  • The system also reverses any changes the process initiated.

In Admin Studio, you use the Queue processor landing page to trace and monitor Queue Processor rules in you application.

Users with SysAdmin4 role can troubleshoot issues with the queue processor by tracing the running processes and examining the items in the Broken Queue.

queue process landing page

The Job scheduler triggers items to process at pre-configured times.

  • It does not queue items.
  • To troubleshoot issues with job scheduler processes, you can run a trace on the failing processes.
  • You can also configure the performance tool manage statistic aggregation for job scheduler rules.
Job scheduler landing page pega 8

Note: If you do not see a queue processor or job scheduler in Admin Studio, you may have to enable the system to find it. Configure the ASYNCPROCESSOR requstor type to include an access group with access to the application.

asyncprocessor pega 8 system settings

Hope you learned about How To Configure Background Processing – Pega 8.

Leave a Reply

Your email address will not be published. Required fields are marked *