Creating and deploying Application Asset
6 Tasks
30 mins
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.
Challenge Walkthrough
Detailed Tasks
1 Create the customerFound application property
- Download the Robotic Banking project:
- Save the file to your desktop, and then extract the project folder to
C:\Users\<username>\Documents\Pega Robot Studio\Projects\. - 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.
- In the , open the BankerInsight application designer.
- On the application designer, click the Interface tab to display details regarding the application interface, as shown in the following figure:
- In the Properties section, click the icon to add a new property to the Asset, as shown in the following figure:
- In the dialog box, in the Application property name field, enter customerFound, and then click .
- On the Application property form, set the property parameters:
-
Select the checkbox.
-
In the list, select .
-
In the list, select .
-
- On the form, click to add an advanced property to the Asset.
- On the Application property form, click Configure logic for property read (GET) to open the get method of the property.
- On the Palette tab, in the section, expand BankerInsight > BankerInsight1 > grpClientDetails, and then drag the labelCustomerSearch control to the automation surface.
- In the dialog box, select Text property, and then click .
- In the Toolbox, in the search field, enter containsAll, and then drag the method to the automation surface.
- In the dialog box, click .
- On the ContainsAll design block, click the values0 parameter and enter Customer.
- On the ContainsAll design block, click the values1 parameter and enter selected.
- On the automation surface, connect the links, as shown in the following figure:
- On the toolbar, click to save the automation.
2 Create a CustomerSearch private method with error handling
- In the Project Explorer, click the BankerInsight to open the application designer.
- On the Interface tab, in the section, click the icon.
- In the dialog box, in the field, enter CustomerSearch, then click to create a new application method.
- On the toolbar, click Project to return to Project Explorer.
- In the Project Explorer, open the GetCustomerDetails automation.
- On the automation surface, select design blocks, as shown in the following figure:
- 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.
- Open the CustomerSearch automation, right-click, and then select Paste to move design blocks to the new automation, as shown in the following figure:
- Add the following design blocks to the automation surface:
Design block name Actions Entry point
- Right-click on the automation surface, and then select Add > Entry Point.
- On the entry point, click the icon to add an input parameter.
- Click param1, and enter customerId.
Exit point
- Right-click on the automation surface, and then select Add > Exit Point.
- Click Exit1, and enter Exit.
- Click Void, and select Boolean.
- Click the Add icon to add an exit parameter.
- Click param1, and enter msgDetails.
Exit Label - Right-click on the automation surface, and select Add > Label.
- Click Label1, and enter Exit
- Click the Add icon twice to add two parameters.
- Click param1, and enter msgDetails
- Click String of the second parameter, and select Boolean.
- Click param2, and enter Result.
- Add the customerFound_get method to the automation surface:
- On the toolbar, click .
- In the dialog box, on the Automation tab, click the icon for the customerFound_get automation.
- Click .
- On the Palette, in the Automations section, drag the customerFound_get control to the automation surface.
- On the Palette, in the Applications section, expand BankerInsight > BankerInsight1 > grpClientDetails, and then drag the labelCustomerSearch control to the automation surface.
- In the Select action dialog box, select TextChanged event, and then click .
- On the automation surface, right-click the TextChanged event, and then click Wait for this event.
- On the automation surface, add automation labels and error handling:
Design block Actions Jump To Exit - Right-click on the automation surface, and then select Jump To > Exit.
- Click Result, and select False.
- Click msgDetails, and enter BI-002.
Jump To Exit - Right-click on the automation surface, and then select Jump To > Exit.
- Click Result, and select True.
- On the automation surface, connect the links, as shown in the following image:
- On the toolbar, click Save to save the automation.
3 Use the Project analysis tool to resolve issues
- In the menu of Pega Robot Studio, click Project > Run analysis, as shown in the following figure:
- 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:
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.
- Select the customerId property, right-click, and then select Delete
- On the Palette Tab, expand the Locals > Run section, and then drag the customerId parameter to the automation surface.
- Connect the output data port of the customerId design block to the txtCustNum input port.
- On the toolbar, click to save the automation.
- 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
- In the Project Explorer, click BankerInsight to open the application designer.
- On the Interface tab of the application designer, click Asset globals to open application globals, as shown in the following figure:
- In the Toolbox, expand the Variables section, and then drag the Boolean variable to the Globals.
- In the properties grid of the Boolean variable, in the Name field, enter isLoggedOn.
- On the Toolbar, click to save changes in the Asset Globals.
- On the Toolbar, click the BankerInsight tab to open the application designer.
- On the Interface tab, in the Events section, click the icon to add a new application event, as shown in the following figure:
- In the Add new application event dialog box, in the Application event name field, enter loggedOn, and then click .
- On the form, set the Advanced property to True, and then click , as shown in the following figure:
5 Create the private application method to handle the application event. Use the application event in the Asset.
- On the Toolbar, click BankerInsight to open the application designer.
- On the Interface tab, in the Methods section, click an icon to add a new application method.
- In the dialog box, in the Application method name field, enter Raise_loggedOn, and then click to open the application method.
- On the Palette tab, in the Applications section, drag the BankerInsight control to the automation surface.
- In the dialog box, click More, and then click the Events tab to display application events.
- On the Events tab, select the loggedOn event, and then click to add the event to the automation surface, as shown in the following figure:
- On the Palette tab, expand the Asset globals section, and then drag the isLoggedOn global variable to the automation section.
- In the window, select a Value property, and then click .
- In the isLoggedOn design block, click the Value property to display a menu, and then select True.
- On the automation surface, connect the design blocks, as shown in the following figure:
- On the , click and open the LogIn application method.
- On the Palette tab, expand the Applications section and drag the BankerInsight control to the automation surface.
- In the window, select the Fire Event method, and then click , as shown in the following figure:
- 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:
- 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.
- On the automation surface, connect the links, as shown in the following figure:
- On the Toolbar, click to save changes.
6 Update GetCustomerDetails method with error handling and helper methods
- In the Project Explorer, click the BankerInsight to open the application designer.
- On the application designer, click the Interface tab to display details regarding the application interface.
- In the Methods section, select the GetCustomerDetails method to display the application method properties.
- In the Visibility type field, select Public, as shown in the following figure:
- On the method details, click to open the application method.
- On the toolbar, click .
- In the dialog box, on the Automation tab, click the icon for the following automations:
- LogIn
- CustomerSearch
- Click .
- On the Palette tab, in the Asset globals section, drag the isLoggedOn global variable to the automation surface.
- In the window, select the Value property, and then click .
- On the Palette tab, in the Automations section, drag the LogIn automation to the automation surface, select the Run method, and then click .
- On the Palette tab, in the Automations section, drag the CustomerSearch automation to the automation surface, select the Run method, and then click .
- On the Palette tab, expand the Locals > Run section, and then drag the customerId parameter to the automation surface.
- Connect the output data port of the customerId design block to the customerId input port of the CustomerSearch design block.
- On the Palette tab, in the Locals section, drag the username and password input parameters to the automation surface.
- Add or update the following design blocks to the automation surface:
Design block name Actions Exit point - Click Exit1, and enter Exit.
- Click Void, and then select Boolean.
- Click the icon to add an exit paremter.
- Click param1, and enter msgDetails.
Exit label - Right-click the automation surface, and then select Add > Label.
- Click Label1, and then enter Exit.
- Click the icon twice to add two parameters.
- Click param1, and then enter msgDetails.
- Click String of the second parameter, and then select Boolean.
- Click param2, and then enter Result.
- On the automation surface, add automation labels and error handling:
Design block Actions Jump To Exit - Right-click the automation surface, and then select Jump To > Exit.
- Click Result, and then select False.
- Click msgDetails, and then enter BI-005.
Jump To Exit - Right-click on the automation surface, and then select Jump To > Exit.
- Click Result, and then select False.
- Click msgDetails, and then enter BI-002.
Jump To Exit - Right-click on the automation surface, and then select Jump To > Exit.
- Click Result, and then select True.
- On the automation surface, connect the links, as shown in the following image:
- Right-click the automation surface, and then select Arrange blocks > Extend lines to organize design blocks, as shown in the following figure:
- On the toolbar, click 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.
Want to help us improve this content?