Table of Contents

Tutorial: Automating processes in your Pega Platform application with Robotic Process Automation (RPA)

You can use Robotic Process Automations (RPA) to automate repetitive and unattended back-office activities directly from your Pega® Platform application. You can batch process large volumes of cases faster and with fewer errors compared with manual handling.

For example, you can queue an automation to process one or more stages of an automobile insurance claim. After a claim is submitted, the claim can immediately be routed to a robotic automation virtual machine (VM). The VM runs an automation that analyzes the information submitted with the claim, looks up and verifies policy holder information, and updates web and desktop applications with case information.

When you implement automations with your case type, case assignments are first routed to robotic automation work queues. A VM retrieves the assignment from the queue, obtains the case data associated with the assignment, and performs the specified automation. After it processes the assignment, any modified data is sent back to the case, and the VM retrieves the next assignment to process.

This tutorial takes approximately 90 minutes to complete.

Prerequisites

Before you begin, ensure that the following tasks have been completed:

Automation configuration

Automations are configured in Pega Robotic Automation Studio by the automation developer. Provide the developer with the following information:

  • The class name of the case type that is running the automation. The Pega Robotic Automation Studio developer configures the automation to use this class to retrieve a list of the relevant records that are configured on the case type.
  • The fields within a case type that contain the data that is passed between the automation and your application. These fields must be marked as relevant records.

For example, your application might contain fields that users can edit and whose values you want to send to the automation, which then sends the information to all the applications that are running on the desktop (for example, First name, Last name, and Email address). These fields must be marked as relevant records.

Fields that you add in Case Designer or Data Designer are automatically marked as relevant records. You can also add other fields (properties) that were created in Designer Studio in the Relevant Records landing page.

After the Pega Robotic Automation Studio developer specifies a class name, the automation retrieves the fields that are marked as relevant records, and the developer can select which of those fields are to be shared.

You can share scalar data only between your Pega application and an automation.

VM registration

Virtual machines (VMs) must register with the Pega Platform before they can retrieve assignments that are routed to their work queues. After registration, your application can monitor, track, and report on automation activity.

VM registration consists of the following steps:

  1. Pega Robotic Automation Runtime connects to the Pega Platform and authenticates as the operator ID that registers VMs.
  2. The system runs the logic in the pyGetAccessGroupForRobotByWorkGroup decision table. This decision table maps the access group of the operator ID into which the VM authenticates to the work group that contains the work queues from which the VM obtains its assignments.
  3. After the system runs the logic in the decision table, operator IDs are created for each VM and are registered in Pega Platform.

Configuring Pega Platform to register virtual machines


Virtual machines (VMs) must register with the Pega Platform before they can retrieve assignments that are routed to their work queues. Configuring the Pega Platform to register VMs consists of the following steps:

  1. Configuring the administrative operator.
  2. Configuring the work group and work queues.
  3. Mapping access groups and work groups.

Configuring the administrative operator

Create a Pega Platform operator ID, which registers the robotic VMs, and whose credentials are also used by Pega Robotic Automation Runtime.

You can assign to the administrative operator any access group that points to your application, but the access group must contain the PegaRULES:RoboticAdministrator role, which provides the minimum privileges required to register a VM. Do not add any other roles or access group to the operator ID.

  1. Create the operator.
    1. In Designer Studio, click +Create > Organization > Operator ID.
    2. Enter a short description and name for the operator ID, and click Create and open.

For more information about operators, see About Operator ID data instances.

  1. Create an access group for the operator and assign it to the operator.
    1. On the Profile tab of the Operator ID form, in the Application access section, click the Open icon.
    2. Enter a short description and name for the access group, and then click Create and open.
    3. On the Definition tab of the Edit Access Group form, in the Application field, specify the name and version of an existing application.

For more information about access groups, see Access group data instances.

  1. In the Available roles section, enter PEGARULES:RoboticAdministrator in the field.
  2. Click Save in the Edit Access Group form.

For more information about adding roles to access groups, see Access group form: Completing the Definition tab.

Configured Access Group form

Configured Access Group form

  1. On the Profile tab of the Operator ID form, in the Application Access section, click the radio button of the access group that you created for the administrative operator.
  2. Save the Operator ID form.

Configuring the work group and work queues

Configure the work group and work queues from which each VM will register to obtain assignments.

    1. Create a work group that contains the work queues from which the VMs obtain assignments. The work group should be associated with a ruleset in your application stack.
      1. Click +Create > Organization > Work Group.
      2. Enter a short description and name for the work group, and then click Create and open.
      3. On the Work group tab of the Edit Work Group form, in the Manager field, enter the operator ID of the manager of this work group.
      4. In the Default workbasket field, specify the default work queue (for example, the work queue for your organization) for the work group.
      5. Click Save in the Edit Work Group form.

    After you create one or more work queues from which the VMs retrieve assignments, you should replace the default work queue with the name of one of the work queues.

    For more information about work groups, see About Work Group data instances.

    Work group with default work queue

    Work group with default work queue

    1. Create a work queue for each assignment type that you want to process.
      1. Click +Create > Organization > Workbasket.
      2. Enter a short description and name for the work queue, and click Create and open.

    For more information about work queues, see About workbasket data instances.

    1. ​Configure the work queue to use automated processing.
      1. On the Workbasket tab, from the Type list, select Robotic.
      2. In the Maximum queue length field, enter the maximum number of assignments that should be in the work queue at any time.

    ​If the number of queued items exceeds this threshold, the queue turns red on Pega Robotic Automation Management Console (available on Pega Exchange) indicating that assigned VMs are not keeping pace with the incoming rate of work. You can change this value in Pega Robotic Automation Management Console.

    1. In the Maximum automation execution time (seconds) field, enter the amount of time that the VM is expected to take to run the automation that is specified on the assignments in this work queue.

    If the VM takes longer to run the automation than this value, the VM turns red in Pega Robotic Automation Management Console, indicating that an administrator might need to investigate issues with the VM.

    You can change this value in Pega Robotic Automation Management Console.

    1. In the Name field, specify the name of the organization to which the work queue belongs.
    2. In the Unit field, specify the organizational unit to which the work queue belongs.
    3. In the Div field, specify the division to which the work queue belongs.
    4. In the Work group field, specify the work group to which the work queue belongs.
    5. Configure other work queue settings, as appropriate.
    6. Click Save to save the rule form.

    Work queue for automationsWork queue for automations

    1. ​Replace the default work queue for your work group with the name of one of the work queues from which VMs retrieve assignments.
      1. Open the work group.
      2. In the Default workbasket field, specify the work queue to use.
      3. Click Save to save the rule form.

    Work group with updated work queue

    Work group with updated work queue

    Mapping access groups and work groups

    Map access groups to the work groups into which VMs register.

    1. Click Explorer > Records.
    2. Expand Decision and click Decision table.
    3. Click the pyGetAccessGroupForRobotByWorkGroup decision table in the Pega-Robot-Register class and save it in your application ruleset.
      1. Click Save as.
      2. From the Add to ruleset field, select your application ruleset.
      3. Click Create and open.
    4. Add the work groups and map them to the access groups that are in your application.

    Work group mapped to an access group in the pyGetAccessGroupForRobotByWorkGroup decision table

    Work group mapped to an access group in the pyGetAccessGroupForRobotByWorkGroup decision table

    For more information about decision tables, see About decision tables.

    1. Click Save to save the rule form.
    2. Optional: Configure the heartbeat interval. See Configuring the heartbeat interval.

    Configuring the heartbeat interval

    Each VM sends a heartbeat, or periodic message, to your Pega Platform application, to indicate that the VM is still running and available. The default interval is one heartbeat message every 30 seconds, which you can modify.

    1. Click Explorer > Records.
    2. Expand SysAdmin and click Dynamic System Settings.
    3. Click Pegarobotics/HeartbeatInterval in the Pega-ProcessEngine ruleset.
    4. On the Settings tab, in the Value field enter the interval, in seconds, during which each VM sends a heartbeat to the system.

    Dynamic System Settings heartbeat intervalDynamic System Settings heartbeat interval

    1. Click Save to save the rule form.

    For more information about Dynamic System Settings, see Dynamic System Settings data instances.

    1. Add and configure the Assign to robot queue shape in your case type. See Assigning a task to a robotic work queue.

    Assigning a task to a robotic work queue

    Use the Assign to robot queue shape in a flow to integrate Robotic Process Automation (RPA) with a case. By defining the tasks that a virtual machine can run, you can reduce the need for human input in your application and resolve cases faster.

      1. Add the Assign to robot queue shape to your case type. For more information, see Adding a shape to a flow.

      Assign to robot queue advanced shapeAssign to robot queue shape

      1. Configure the Assign to robot queue shape. When you configure the shape, you specify the work queue from which the VM retrieves assignments. You also specify the automation that the VM runs after retrieving the assignment. For more information, see Assigning a task to a robotic work queue.

      Related Content

      Have a question? Get answers now.

      Visit the Pega Support Community to ask questions, engage in discussions, and help others.