This content has been archived and is no longer being maintained.

Table of Contents

Article

Automating processes in your Pega 7.2.1 application

You can use Pega Robotic Process Automation (RPA) to automate repetitive and unattended back-office activities directly from your Pega 7 Platform application. With RPA, 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 be routed immediately to a robot 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.

Automated processing is different from desktop processing. When you use desktop processing, automations are run from a case type and run on the user's desktop. For more information, see Configuration of Robotic Desktop Automation (RDA) with your Pega 7.2.1 application.

The minimum requirements for building an automation are:

  • Pega 7.2.1 and Pega HFIX-29471
  • Pega Robotics Studio 8.0.1015.0

Prerequisites

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

VM registration

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

VM registration comprises the following steps:

  1. Pega Automation Runtime Studio connects to the Pega 7 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 the Pega 7 Platform.

Configuring the Pega 7 Platform to register virtual machines


Virtual machines (VMs) must first register with the Pega 7 Platform before they can retrieve assignments that are routed to their work queues. Configuring the Pega 7 Platform to register VMs comprises 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 7 Platform operator ID, whose credentials are also used by Pega Robotic Automation Runtime, that registers the robotic VMs.

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.

  1. Create the operator. For more information about operators, see Operator ID form – Completing the Security tab.
  2. Create an access group for the operator and assign it to the operator. For more information about access groups, see Access Group data instances.
  3. Add the PEGARULES:RoboticAdministrator role to the access group that you created. For more information, see Access group form – Completing the Definition tab. Do not add any other roles or access groups to the operator ID.

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. Associate the work group with a ruleset in your application stack. For more information about work groups, see About Work Group data instances.
  2. Create a work queue for each VM. For more information about work queues, see About Workbasket data instances.
  3. Configure the work queue to use automated processing by completing the following steps:
    1. Click the Workbasket tab.
    2. From the Type list, click Robotic.
    3. In the Maximum queue length field, enter the maximum number of assignments that can be in the work queue at any time.

If the number of queued items exceeds this threshold, the queue turns red on your 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 the 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 the Pega Robotic Automation Management Console, indicating that an administrator might need to investigate issues with the VM. You can change this value in the Pega Robotic Automation Management Console.

  1. In the Work group field, enter the work group to which the work queue belongs.
  2. Configure other work queue settings, as appropriate.
  3. Click Save to save the rule form.

Mapping access groups and work groups

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

  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 to your application ruleset.
  4. Add the work groups and their corresponding access groups in the application. For more information about decision tables, see About Decision Tables.
  5. Click Save to save the rule form.

Configuring the heartbeat interval

Each VM sends a heartbeat, or periodic message, to your Pega 7 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. In the Pega-ProcessEngine ruleset, click Pegarobotics/HeartbeatInterval.
  4. On the Settingstab, in the Valuefield, enter the interval, in seconds, during which each VM sends a heartbeat to the system.
  5. Click Save to save the rule form.

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

Assigning a task to a robotic work queue

Add 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 flow by doing the following steps.
    1. Open a flow by searching for it or by using the Application Explorer.
    2. Optional: To ignore validation errors while you work on a flow, enable draft mode.
    3. In the toolbar of Process Modeler, click the Shape paletteShape palette icon icon to display a menu of shapes.
    4. Click an option in the menu to add a shape to the flow diagram.
    5. Drag the shape to a different position on the flow diagram, based on the order of events in the flow.
    6. Replace the default name of the shape with descriptive text that is fewer than 128 characters.
    7. Double-click the shape to open the property panel.
    8. Enter values in the fields of the property panel, based on the functionality that your flow requires.
  2. Double-click the Assign to robot queue shape in your flow to open the Robot queue dialog box.
  3. From the Define flow list, select an option that defines the context of the robotic automation, which runs as a subprocess of the current flow.
  • OpenTo work on the current case, in the Define flow list, select On current page.
  • OpenTo work on a specific case:

  1. In the Define flow list, select On specific work item.
  2. In the Work property field, press the Down Arrow key, and select a property that stores the key value of the case on which your subprocess works.
  3. In the Class field, press the Down Arrow key and select the class of the case.
  4. Optional: To define the clipboard page that stores case data, enter a value in the Page name field.

If the case does not already have a page and you do not provide a page name, your application creates a page named pyNextObj, pyNextObj_1, and so on.

  • OpenTo work on an embedded page:
  1. In the Define flow list, select On embedded page.
  2. In the Page property field, press the Down Arrow key and select a property that stores the embedded page.

    This property must use a mode of Page, Page List, or Page Group.

  3. In the Class field, press the Down Arrow key and select the class of the embedded page.​

Tip: To use a class that is not known at design time, enter a property reference or expression in the Class field.

  1. In the Route to queue field, enter the name of the work queue from which the virtual machine retrieves assignments.
  2. In the Run robotic automation field, enter the automation that the virtual machine runs after retrieving the assignment.
  3. Optional: To validate case data after the assignment is processed, press the Down Arrow key in the Assignment validation criteria field, and select a validation rule.
  4. Optional: To apply a goal and deadline to the assignment, press the Down Arrow key in the Assignment service level field, and select the name of a service-level agreement.
  5. Optional: To add a message to the audit trail of a case, press the Down Arrow key in the Audit note field, and select the name of a field value that defines a localized message.
  6. Optional: To allow the main flow to continue processing without waiting for the robotic automation to complete, select the Spinoff flow check box.
  7. Click Submit to close the Robot queue dialog box.
  8. Click Save.

You can test the Assign to robot queue shape by connecting it to other shapes and running your flow.

​Error handling

After a VM runs an automation on an assignment, it returns one of the following statuses:

  • Completed
  • Completed with errors
  • Did not complete

Additionally, the data that is passed back to your case type might not pass your specified validation criteria.

The following list describes these validation and status scenarios:

  • If validation passes and the automation status is set to Completed, flow processing continues.
  • If validation passes and the automation status is set to Completed with errors or Did not complete, the pyRepairAutomation subflow runs. This subflow has an assignment called Repair Automation, which can be manually moved forward or configured to be rerun. You can also customize this subflow with your own error handling logic.
  • If validation fails, the assignment is returned to the work queue from which it was obtained and can be processed by a VM again.

Published August 22, 2016 — Updated March 13, 2018


100% found this useful

Related Content

Have a question? Get answers now.

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