PerformingDataHandlingWithToolbox_Start_R25.zip
(319.07 KB)
Performing data handling with the Toolbox
6 Tasks
30 mins
Beginner
Robotic Process Automation
English
Scenario
A Robotic Banking company introduces cashback credit cards for customers that signed up for a Supershop promotion. You are to create an automation that reads Customer IDs from a file that contains all customers who are authorized for a promotion. For each customer, select transactions made for a Supershop. Each transaction results in adding USD10 to the user's saving account.
Complete the following tasks:
- Create an automation that reads the IDs of the clients from a text file and saves them in a lookup table.
- Create an automation that loops through the customer's list and searches for each customer ID in the BankerInsight application.
- Create an automation that searches for all transactions with a description: Supershop and saves the number of such transactions.
- Create an automation that includes a USD10 discount to the client's account.
- Move all automations concerning the Supershop promotion to a separate folder.
Challenge Walkthrough
Detailed Tasks
1 Create a lookup table structure that contains data of all clients that signed up for a Supershop promotion
- Download the Robotic Banking project:
- Save the file to your desktop and unzip the file to extract the project folder to your 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 Robotic Banking.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 to the location of your BankerInsight application.
- On the Project Explorer, click Globals to open the Globals designer.
- On the Toolbox, in the search field enter Lookup to find a LookupTable component.
- Drag the LookupTable component to the Globals table to add it to the project.
- On the property grid, change the Name parameter to SupershoppersTable.
- On the property grid, click the More icon on the Fields property to open the .
- In the , click the Add icon to add the following fields to the lookup table:
FieldName Key Type CustomerId true System.String First name false System.String Last name false System.String - Click to close the .
- On the toolbar, click Save to save the changes to the Globals.
2 Create the GetSupershopClientList automation
- On the toolbar, click Project to return to the Project Explorer.
- On the Project Explorer open the GetSupershopClientsList automation.
- On the Palette, in the section, drag the SupershoppersTable to the automation surface to display the dialog box.
- In the dialog box, find the ImportDelimitedFile method and add it to the automation.
- In the dialog box, click to display the properties, methods, and events for the control.
- In the search field, enter ImportDelimitedFile.
- Click the Method tab.
- Select the ImportDelimitedFile method check box.
- Click to add the property to the design surface.
- On the ImportDelimitedFile method, click the names of parameters to change them to the following values:
Parameter Value filePath C:\Users\<username>\Desktop\RobotStudioChallengeAssets\Supershop_clients.txt delimiter Comma mappingMethod UseColumnIndex - In the tab, in the search field, enter Toast to find a Toast Notification component, and then drag it to the automation surface.
- In the message parameter of the Toast Notification component, enter Customer data transferred to lookup table.
- On the automation surface, connect the links as shown in the following example:
- On the toolbar, click Save to save the automation.
- Test the automation:
- On the automation toolbar, click Test.
- In the Testing automation dialog box click .
- Verify that the toast notification is correctly displayed.
3 Create the CustomerSearch automation
- On the toolbar, click Project to return to the Project Explorer.
- On the Project Explorer, click CustomerSearch to open the automation.
- On the Palette tab, in theGlobals section, drag the SupershoppersTable to the automation surface to display dialog box.
- In the dialog box, find the RowCount property and add it to the automation.
- Add a decision block to check if the Lookup Table contains any entries:
- Double-click the automation surface to open the Quick add dialog box.
- In the Toolbox section, click Workflow > Decisions.
- Double-click the DoesNotEqual component to add it to the automation surface.
- Connect the RowCount property with the decision box to validate the number of entries in the lookup table as shown in the following image.
- On the decision block, insert 0 as a (not set) parameter.
- On the Palette tab, in theGlobals section, drag the SupershoppersTable to the automation surface to display the Select action dialog box.
- In the Select action dialog box, find the GetKeys method, and then add it to the automation.
- Add a ListLoop to iterate through the Lookup Table entries:
- Double-click the automation surface to open the Quick add dialog box.
- In the search field of the dialog box, enter ListLoop.
- Double-click the ListLoop component to add it to the automation.
- Connect the ListLoop to the GetKeys method, as shown in the following image.
- Add the BI_ClientSearch automation to the CustomerSearch automation:
- On the CustomerSearch automation, click to open Include in palette dialog box.
- In the dialog box, click the Automation tab.
- In the BI_ClientSearch row, click the button to add the application to the automation.
- Click to close the Include in palette window.
- On the Palette, in the Automations section, drag the BI_ClientSearch automation to the design surface to open Select action dialog box.
- In the dialog box, select Run method then click Add.
- On the automation surface, connect the links, as shown in the following image.
- On the toolbar, click Save to save the automation.
4 Create the SearchForTransactions automation
- On the toolbar, click Project to return to the Project Explorer.
- On the Project Explorer, click SearchForTransactions to open the automation.
- Add the BankerInsight application to the SearchForTransactions automation:
- On the toolbar, click to open Include in palette dialog box.
- In the dialog box, click the Application tab.
- In the BankerInsight row, click the button to add the application to the automation.
- Click to close the Include in palette window.
- On the Palette tab, in the section, click BankerInsight > frmBankerInsight > tabCustomerAccount > tabAccountTypes to expose the transaction table control.
- Drag the dgvAcctTrans control to the automation surface to display the dialog box.
- In the Select Action dialog box, find the Row Count property, and then add it to the automation surface.
- Add a ForLoop to iterate through the user transaction entries:
- Double-click the automation surface to open the Quick add dialog box.
- In the search field of the dialog box, enter ForLoop.
- Double-click the ForLoop component to add it to the automation.
- On the ForLoop design block, right-click on the Limit parameter, and then select Reset Changes, as shown in the following image:
- Drag the dgvAcctTrans control to the automation surface to display the Select action dialog box.
- In the Select Action dialog box, find the GetCellValue(int32 row, int32 col) method, and then add it to the automation surface.
- In the column parameter, enter 2.
- On the Toolbox, in the search field, enter Contains to find a Contains method, and then drag the Contains method to the automation surface.
- In the seekString parameter, enter Supershop.
- On the automation surface, connect the links as shown in the following image.
- On the toolbar, click Save to save the automation.
- Click Project to return to the Project Explorer.
- On the Project Explorer, click CustomerSearch to open the automation.
- Add the SearchForTransactions automation to the CustomerSearch automation:
- On the toolbar, click to open dialog box.
- In the dialog box, click the Automation tab.
- In the SearchForTransactions row, click the button to add it to the automation.
- Click to close the window.
- On the Palette tab, in the section, drag the SearchForTransactions automation to the automation surface.
- In the Select action dialog box, find a Run method and add it to the automation.
- On the automation surface, connect the links, as shown in the following image.
- On the toolbar, click Save to save the automation.
5 Create the AddDiscount automation
- On the Project Explorer, click AddDiscount to open the automation.
- On the Palette tab, in the section, click BankerInsight > frmBankerInsight > tabCustomerAccount > tabAccountTransactions to expose the add transaction form controls.
- Drag the txtTransAmt control to the automation surface to display the dialog box.
- In the dialog box, find the Text property and add it to the automation:
- In the dialog box, click .
- In the search field, enter Text.
- Click the Property tab.
- Select the Text check box.
- Click to add the property to the design surface.
- In the Text property, enter 10.
- Drag the txtTransNotes control to the automation surface to display the dialog box.
- In the dialog box, repeat steps 4a-4e to find the Text property for the txtTransNotes control and add it to the automation.
- In the Text property, enter Supershop discount.
- Drag the btnSubmit control to the automation surface to display the dialog box.
- In the dialog box, repeat steps 4a-4e to find the PerformClick (no parameters) method for the btnSubmit control and add it to the automation.
- On the automation surface, connect the links as shown in the following image.
- On the toolbar, click Save to save the automation.
- Click Project to return to the Project Explorer.
- On the Project Explorer, click SearchForTransactions to open the automation.
- In the SearchForTransactions automation, on the toolbar, click and add the AddDiscount automation to the Palette.
- On the Palette tab, in the section, drag the AddDiscount to the automation surface.
- In the Select action dialog box, find the Run method and add it to the automation.
- On the automation surface, connect the links, as shown in the following image.
- On the toolbar, click Save to save the automation.
6 Move all automations concerning the Supershop promotion to a separate folder.
- On the toolbar, click Project to return to the Project Explorer.
- On the Project Explorer, click Add > Folder to display Add new folder dialog.
- In the Add new folder dialog, in the Folder name field, enter Supershop.
- Click Add to add a new folder to the Project Explorer.
- Drag the following automations to the Supershop folder:
- AddDiscount
- CustomerSearch
- GetSupershopClientList
- SearchForTransactions
- Save the project.
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.
Want to help us improve this content?