Skip to main content

Creating and deploying Application Asset

6 Tasks

30 mins

Pega Robotic Automation 22.1
Visible to: All users Applies to: Pega Robotic Automation 22.1
Beginner
Robotic Process Automation
English

Scenario

Create the Application Asset for the Bankerinsight application that logs in, searches for a customer, and gets all customer account details. Add application properties and events to build the Asset. Add error handling, and move proper functionality to the private methods. Deploy the created Application Assets to the local directory.

Complete the following tasks:

  • Create a private application method CustomerSearch with error handling. Create application property to support the flow.
  • Update the LogIn application method, created using the Intelligent Recording with the loggedOn application event to keep track of the application state.
  • Update the GetCustomerDetails application method to use private application methods. Modify the GetCustomerDetails input and output parameters to adjust the Application Assets interface.
  • Use the Project analysis tool to resolve issues. 
  • Deploy the Application Asset to the local folder. 

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

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

Challenge Walkthrough

Detailed Tasks

1 Create the customerFound application property

  1. Download the Robotic Banking project: 
  2. Save the file to your desktop, and then extract the project folder to C:\Users\<username>\Documents\Pega Robot Studio\Projects\.
  3. On the Home screen in Pega Robot Studio, click Open Project, and then navigate to the projects folder and open StartingProject_BankerInsightApplicationAssets.pegaproject
    Note: The starter project includes a configured BankerInsight application. The value of the Path field must match the location of BankerInsight on your local computer for the project to function properly. In the BankerInsight application, change the value of the Path field to the location of your BankerInsight application.
  4. In the Project Explorer, open the BankerInsight application designer.
  5. On the application designer, click the Interface tab to display details regarding the application interface, as shown in the following figure: 
    The interface tab of application designer showing elements of the Application Asset.
  6. In the Properties section, click the Add icon to add a new property to the Asset, as shown in the following figure:
    The interface tab of the application designer. The Add icon in the Properties section is emphasized.
  7. In the Add new application property dialog box, in the Application property name field, enter customerFound, and then click Add.
  8. On the Application property form, set the property parameters:
    1. Select the Advanced checkbox.

    2. In the Property type list, select Boolean.

    3. In the Read-only list, select True.

      The interface tab of the application designer showing parameters of newly added, advanced application property.
  9. On the Application property form, click Save to add an advanced property to the Asset.
  10. On the Application property form, click Configure logic for property read (GET) to open the get method of the property.  
    The Interface tab of the application designer showing the access to the get method of the advanced application property.
  11. On the Palette tab, in the Application section, expand BankerInsight > BankerInsight1 > grpClientDetails, and then drag the labelCustomerSearch control to the automation surface.
  12. In the Select action dialog box, select Text property, and then click Add.
  13. In the Toolbox, in the search field, enter containsAll, and then drag the method to the automation surface.
  14. In the Choose method overload dialog box, click Submit.
  15. On the ContainsAll design block, click the values0 parameter and enter Customer.
  16. On the ContainsAll design block, click the values1 parameter and enter selected.
  17. On the automation surface, connect the links, as shown in the following figure:
    An example of get method of the application property created for Application Asset.
  18. On the toolbar, click Save to save the automation.

2 Create a CustomerSearch private method with error handling

  1. In the Project Explorer, click the BankerInsight to open the application designer.
  2. On the Interface tab, in the Methods section, click the Add icon. 
  3. In the Add new application method dialog box, in the Application method name field, enter CustomerSearch, then click Add to create a new application method. 
  4. On the toolbar, click Project to return to Project Explorer.
  5. In the Project Explorer, open the GetCustomerDetails automation.
  6. On the automation surface, select design blocks, as shown in the following figure:
    Automation surface with design block selected to be extracted to sub-automation.
  7. On the automation surface, right-click one of the selected design blocks, and select Cut to remove part of the flow from the application method.
  8. Open the CustomerSearch automation, right-click, and then select Paste to move design blocks to the new automation, as shown in the following figure: 
    Design blocks moved to the new automation.
  9. Add the following design blocks to the automation surface:
    Design block name Actions

    Entry point

    1. Right-click on the automation surface, and then select Add > Entry Point.
    2. On the entry point, click the Add icon to add an input parameter.
    3. Click param1, and enter customerId.

    Exit point

    1. Right-click on the automation surface, and then select Add > Exit Point
    2. Click Exit1, and enter Exit.
    3. Click Void, and select Boolean.
    4. Click the Add icon to add an exit parameter.
    5. Click param1, and enter msgDetails
    Exit Label
    1. Right-click on the automation surface, and select Add > Label.
    2. Click Label1, and enter Exit
    3. Click the Add icon twice to add two parameters.
    4. Click param1, and enter msgDetails
    5. Click String of the second parameter, and select Boolean.
    6. Click param2, and enter Result.
  10. Add the customerFound_get method to the automation surface:
    1. On the toolbar, click Include.
    2. In the Include in Palette dialog box, on the Automation tab, click the Add icon for the customerFound_get automation.
    3. Click Done.
    4. On the Palette, in the Automations section, drag the customerFound_get control to the automation surface.
  11. On the Palette, in the Applications section, expand BankerInsight > BankerInsight1 > grpClientDetails, and then drag the labelCustomerSearch control to the automation surface.
  12. In the Select action dialog box, select TextChanged event, and then click Add.
  13. On the automation surface, right-click the TextChanged event, and then click Wait for this event.
  14. On the automation surface, add automation labels and error handling:
    Design block Actions
    Jump To Exit
    1. Right-click on the automation surface, and then select Jump To > Exit.
    2. Click Result, and select False.
    3. Click msgDetails, and enter BI-002.
    Jump To Exit
    1. Right-click on the automation surface, and then select Jump To > Exit.
    2. Click Result, and select True.  
  15. On the automation surface, connect the links, as shown in the following image:
    An automation surface showing the customerSearch  automation.
  16. On the toolbar, click Save to save the automation.
     

3 Use the Project analysis tool to resolve issues

  1. In the menu of Pega Robot Studio, click Project > Run analysis, as shown in the following figure:
    pega Robot Studio menu showing the Run analysis option of Project.
  2. In the results, on the Project Analysis tab, double-click Invalid block to display the automation with the error design block, as shown in the following figure:
    The Pega Robot Studio showing the result of Project analysis tool with the invalid block error.
    Note: The issue was caused by coping design blocks between application methods in Task 6-8 of Step 2. The customerId property is faultily associated with the entry point of automation from when it was copied.  
  3. Select the customerId property, right-click, and then select Delete
  4. On the Palette Tab, expand the Locals > Run section, and then drag the customerId parameter to the automation surface.  
  5. Connect the output data port of the customerId design block to the txtCustNum input port.  
  6. On the toolbar, click Save to save the automation. 
  7. In the menu of Pega Robot Studio, click Project > Run analysis, and then confirm that the issue is no longer present on the Project Analysis tab.  

4 Create the loggedIn application event

  1. In the Project Explorer, click BankerInsight to open the application designer.
  2. On the Interface tab of the application designer, click Asset globals to open application globals, as shown in the following figure:
    The interface tab of the application showing the button that needs to be used to access the Application Asset globals.
  3. In the Toolbox, expand the Variables section, and then drag the Boolean variable to the Globals.
  4. In the properties grid of the Boolean variable, in the Name field, enter isLoggedOn.
  5. On the Toolbar, click Save to save changes in the Asset Globals.
  6. On the Toolbar, click the BankerInsight tab to open the application designer.
  7. On the Interface tab, in the Events section, click the Add icon to add a new application event, as shown in the following figure:
    The interface tab of application showing the Add butto used to add a new application event.
  8. In the Add new application event dialog box, in the Application event name field, enter loggedOn, and then click Add.
  9. On the Application event form, set the Advanced property to True, and then click Save, as shown in the following figure:
    Configuration of n advanced application event on the application event form.

5 Create the private application method to handle the application event. Use the application event in the Asset.

  1. On the Toolbar, click BankerInsight to open the application designer.
  2. On the Interface tab, in the Methods section, click an Add icon to add a new application method.
  3. In the Add new application method dialog box, in the Application method name field, enter Raise_loggedOn, and then click Add to open the application method.
  4. On the Palette tab, in the Applications section, drag the BankerInsight control to the automation surface.
  5. In the Select Action dialog box, click More, and then click the Events tab to display application events.
  6. On the Events tab, select the loggedOn event, and then click Add to add the event to the automation surface, as shown in the following figure:
    The Select action window of the application with an option to add the application event to the automation.
  7. On the Palette tab, expand the Asset globals section, and then drag the isLoggedOn global variable to the automation section.
  8. In the Select action window, select a Value property, and then click Add.
  9. In the isLoggedOn design block, click the Value property to display a menu, and then select True.
  10. On the automation surface, connect the design blocks, as shown in the following figure:
    Automation surface showing the implementation of the raise event method.
  11. On the Project Explorer, click and open the LogIn application method.
  12. On the Palette tab, expand the Applications section and drag the BankerInsight control to the automation surface.
  13. In the Select action window, select the Fire Event method, and then click Add, as shown in the following figure:
    The Method section of the Select action window showing the FireEvent method.
  14. In the FireEvent design block, click eventName property to display a drop-down menu, and then select the loggedOn event, as shown in the following figure:
    Selection of the loggedOn event on the fireEvent design block.
  15. On the automation surface, delete the automation link between the WaitForCreate method and the Jump to Exit design block with a Boolean property set to True.
  16. On the automation surface, connect the links, as shown in the following figure:
    The use of application event in the LogIn automation.
  17. On the Toolbar, click Save all to save changes.

6 Update GetCustomerDetails method with error handling and helper methods

  1. In the Project Explorer, click the BankerInsight to open the application designer.
  2. On the application designer, click the Interface tab to display details regarding the application interface.  
  3. In the Methods section, select the GetCustomerDetails method to display the application method properties.  
  4. In the Visibility type field, select Public, as shown in the following figure:
    The Methods section of the Interface tab of the application showing the visibility type property.
  5. On the method details, click Open to open the application method.  
  6. On the toolbar, click Include.  
  7. In the Include in palette dialog box, on the Automation tab, click the Add icon for the following automations:
    • LogIn
    • CustomerSearch 
  8. Click Done.  
  9. On the Palette tab, in the Asset globals section, drag the isLoggedOn global variable to the automation surface. 
  10. In the Select action window, select the Value property, and then click Add
  11. On the Palette tab, in the Automations section, drag the LogIn automation to the automation surface, select the Run method, and then click Add.    
  12. On the Palette tab, in the Automations section, drag the CustomerSearch automation to the automation surface, select the Run method, and then click Add
  13. On the Palette tab, expand the Locals > Run section, and then drag the customerId parameter to the automation surface.  
  14. Connect the output data port of the customerId design block to the customerId input port of the CustomerSearch design block.  
  15. On the Palette tab, in the Locals section, drag the username and password input parameters to the automation surface. 
  16. Add or update the following design blocks to the automation surface:
    Design block name Actions
    Exit point
    1. Click Exit1, and enter Exit.
    2. Click Void, and then select Boolean.
    3. Click the Add icon to add an exit paremter.
    4. Click param1, and enter msgDetails.
    Exit label
    1. Right-click the automation surface, and then select Add > Label.
    2. Click Label1, and then enter Exit.
    3. Click the Add icon twice to add two parameters.
    4. Click param1, and then enter msgDetails.
    5. Click String of the second parameter, and then select Boolean
    6. Click param2, and then enter Result
  17. On the automation surface, add automation labels and error handling:
    Design block Actions
    Jump To Exit
    1. Right-click the automation surface, and then select Jump To > Exit.
    2. Click Result, and then select False.  
    3. Click msgDetails, and then enter BI-005.
    Jump To Exit
    1. Right-click on the automation surface, and then select Jump To > Exit.
    2. Click Result, and then select False.  
    3. Click msgDetails, and then enter BI-002.
    Jump To Exit
    1. Right-click on the automation surface, and then select Jump To > Exit.
    2. Click Result, and then select True.
  18. On the automation surface, connect the links, as shown in the following image:
    An automation surface showing the getCustomerDetails automation with the error handling added.
  19. Right-click the automation surface, and then select Arrange blocks >  Extend lines to organize design blocks, as shown in the following figure:
    An automation surface showing the getCustomerDetails automation with the error handling added.
  20. On the toolbar, click Save to save the automation. 

This Challenge is to practice what you learned 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?

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