Skip to main content

Creating a basic automation

3 Tasks

20 mins

Pega Robotic Automation 22.1
Visible to all users
Beginner Pega Robotic Automation 22.1 Pega Robotic Process Automation Robotic Process Automation English

Scenario

Create a project that logs in to the BankerInsight application, inserts the Customer Number, and searches for a client to display account details. 

Complete the following tasks:

  • Create the BI_ClientSearch sub automation that inserts the Customer Number and displays the customer's account details in a BankerInsight application. 
  • Create the main automation that performs a log-in and runs the BI_ClientSearch sub automation.
  • Use Jump To and Label design blocks to update BI_Login automation with basic error handling.
  • Execute the project and check the results. 
Note: This is a continuation of the previous challenge, Interrogating a single-page application. If you did not complete this challenge, click the following link to save the file to your desktop and unzip the folder to extract the files.

You must initiate your own Pega instance to complete this Challenge.

Initialization may take up to 5 minutes so please be patient.

Detailed Tasks

1 Create the BI_ClientSearch automation

  1. In Pega Robot Studio, open the Robotic Banking project.
  2. On the Project tab, click Add > Automation to add a new automation to the project.  
    Screenshot showing adding a new automation to the Pega Robot Studio project.
  3. In the dialog box, in the Automation name field, enter BI_ClientSearch
  4. Click Add to automatically display the newly created automation. 
  5. On the BI_ClientSearch tab, click Include to display the Include in palette dialog box. 
  6. On the Application tab in the Include in palette dialog box, click Add to add the BankerInsight application to the Applications section of the Palette tab.
  7. On the Include in palette dialog box, click Done to add the BankerInsight application to the automation.
    Adding a BankerInsight application to the automation
  8. On the automation surface, right-click, and then select Add > Entry Point to add an automation entry point. 
    Adding an entry point to the automation
  9. On the Palette tab, in the Applications section, click BankerInsight > frmBankerInsight > grpClientDetails to expose the main window controls. 
    Screenshot showing controls of the BanerInsight application.
  10. Drag the txtCustNum control to the automation surface to display the Select action dialog box.
    1. In the Select action dialog box, click More to display the properties, methods, and events for the control. 
    2. In the search field, enter Text.
    3. Click the Property tab.
    4. Select the Text check box.
    5. Click Add to add the property to the design surface. 
      Tip: If the Text property is displayed in the main dialog window, you can also double click it to add it to the automation.
      Screenshot showing the Select action window that allows to add properties, methods, and events of selected control.
  11. Drag the btnSearch control to the automation surface to display the btnSearch dialog box.
    1. In the btnSearch dialog box, click More to display the properties, methods, and events for the control. 
    2. In the search field, enter PerformClick. 
    3. Click the Method tab.
    4. Expand the PerformClick group, and then select PerformClick (no parameters) to highlight the method. 
    5. Click Add to add the method to the design surface. 
      Tip: If the PerformClick method is displayed in the main dialog window, you can also double click it to add it to the automation.
      Adding a PerformClick method to the automation
  12. On the automation surface, right-click, and then select Add > Exit Point to add an exit point shape.
  13. On the exit point shape, click the label, and enter Success to rename the exit point shape. 
  14. On the entry point, click the Add icon to add the following input parameter to the sub-automation:
    Parameter Type Parameter Name
    String customerNumber
  15. On the Palette, in the Locals section, drag the customerNumber parameter to add the parameter to the design surface. 
    Screenshot showing the Palette of Pega Robot Studio with the local parameters.
  16. On the automation surface, connect the data links as shown in the following example. 
    Screenshot showing automation that searches for a client account in BankerInsight application.
  17. On the toolbar, click Save to save the automation.  

2 Create the main automation with two nested automations: BI_LogIn and BI_ClientSearch

  1. Click the Project tab to open the Project Explorer.
  2. On the Project Explorer, click and open the Main automation. 
    Screenshot showing opening automation in the Project Explorer.
  3. On the Palette tab, in the Applications section, click BankerInsight to expose login form controls. 
    Applications section of the Palette
  4. Drag the frmLoginForm control to the automation surface to display the Select action dialog box.
    1. In the dialog box, click More to display the properties, methods, and events for the control. 
    2. In the search field, enter Created. 
    3. Click the Event tab.
    4. Select the Created event.
    5. Click Add to add an event to the design surface.
      Screenshot showing addin an event to the automation surface using Select action dialog box.
  5. On the Main automation tab, click Include to add sub-automations to the main automation from the Include in palette dialog box. 
    Including sub-automations to the automation
  6. In the Automations dialog box, click Add to add the following automations to the main automation:
    • BI_LogIn 
    • BI_ClientSearch
  7. Click Done to close the dialog box. 
  8. On the Palette tab, in the Automations section, drag the BI_LogIn automation to the design surface to display the Select action dialog box.
    Screenshot showing the Automations section of the Palette.
    1. Click More to display the properties, methods, and events for the control. 
    2. In the search field, enter Run.
    3. Click the Method tab.
    4. Select the Run method.
    5. Click Add
  9. On the Palette tab, in the Automations section, drag the BI_ClientSearch automation to the design surface to display the BI_ClientSearch dialog box.
    1. Select More to display properties, methods, and events for the control in a pop-up window. 
    2. In the search field, enter Run.
    3. Click the Method tab.
    4. Select the Run method.
    5. Click Add.  
  10. On the automation surface, connect the design blocks as shown in the following image. 
    Screenshot showing using sub-automations: BI_Login and BI_ClientSearch in a main automation.
  11. In the BI_LogIn design block, click the username and password parameters, and enter pega to define the value of the automation's input parameter. 
    Caution: It is not a best practice to use hardcoded credentials. It is used here for training purposes only.
  12. In the BI_ClientSearch design block, click the customerNumber parameter and enter 1234500078963456 to define the value of automation's input parameter. 
  13. On the toolbar, click Save to save the main automation. 
    Screenshot showing connections and parameters of the main automation.

3 Use Label/Jump To components

  1. Click the Project tab to open the Project Explorer.
  2. On the Project Explorer, click and open the BI_LogIn automation.
  3. On the Palette tab, in the Applications section, click BankerInsight > frmBankerInsight to expose the application controls. 
  4. Drag the frmBankerInsight control to the automation surface to display the Select action dialog box. 
    1. In the dialog box, click More to display properties, methods, and events for the control. 
    2. In the search field, enter WaitForCreate.
    3. Click the Method tab.
    4. Select the WaitForCreate (no parameters) method.
    5. Click Add to add a method to the design surface. The WaitForCreate design block waits 30 seconds until the main window of the application is displayed.
       
      Screenshot showing adding a WaitForCreate design block to the automation using Select action window.
  5. On the automation surface, perform the following actions to configure the Label and Jump To components:
    1. Click the link between the PerformClick method and the Success exit point.
    2. Right-click the link, and then select Delete to remove the automation link.
    3. On the automation surface, right-click, and then select Add > Label to add two labels.
    4. On each label shape, click the label, and rename the shape to:
      • Success
      • Failure
    5. On the automation surface, right-click, and then select Add > Exit Point to add an exit point shape.
    6. On the exit point shape, click the label, and enter Failure to rename the shape.
    7. On the automation surface, connect the automation links as shown in the following example. 
      Screenshot showing how to connect labels and exit points to erform error handling of an automation.
    8. Right-click, and then select Jump To > Success to add a JumpTo component to the automation surface. 
    9. Right-click, and then select Jump To > Failure to add a JumpTo component to the automation surface. 
    10. Connect the automation links as shown in the following image. 
      Screenshot showing the use of JumpTo Success and JumpTo Failure labels in the BI_LogIn automation.
  6. On the toolbar, click Save to save the BI_Login automation.
  7. Click the Main automation tab to switch to the Main automation.
  8. On the Toolbox tab, in the search field, enter MessageBox
    Adding a MessageBox to the automation
  9. Drag the Show MessageBox method to the automation surface to display the Choose Method Overload dialog box.
    1. In the Choose Method Overload dialog box, keep the default version of the method.
    2. Click Submit to close the dialog box. 
      Screenshot showing Choose overload method dialog box for the Message Box.
  10. On the automation surface, click the message parameter of the MessageBox design block.
  11. In the message field, enter Application timeout to inform the user about the cause of an automation failure.
  12. On the automation surface, connect the automation links as shown in the following image.
    Screenshot showing the Main automation with automation links.
  13. Save the automation.

Confirm your work

  1. Click the Project tab.
  2. In the right-upper corner of the Pega Robot Studio, click Run all.
  3. Ensure that the automation successfully logs in to the BankerInsight application and displays results as shown in the following example.
    The main automation output
  4.  On the right side of the toolbar, click stop to finish the program execution.
    Screenshot showing how to stop the project execution in the Pega Robot Studio.

This Challenge is to practice what you learned in the following Module:


Available in the following mission:

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

Did you find this content helpful?

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