Skip to main content

Using breakpoints and diagnostic logs

3 Tasks

20 mins

Visible to: All users
Beginner Pega Robotic Automation 19.1 Robotic Process Automation English

Scenario

The CRM application does not require a user name or password to access the data. As a result, the project documentation requires writing a log entry to the log file every time users access the application.

Your assignment

Modify the CRM_E_CRMfrmLogin_Created automation and add a diagnostic log component between the CRMfrmLogin.Created event and the CRMbtnLogin.PerformClick method. Ensure the Runtime Diagnostics File Publisher is set to On. Add breakpoints to step through the automation to watch the log entry complete.

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 Add and configure the diagnostic logging component

Follow these steps to add and configure the diagnostic log component.

  1. From the Solution Explorer, double-click the CRM_E_CRMfrmLogin_Created automation to open the automation in a design window.
  2. In the automation, delete the automation link between the CRMfrmLogin.Created event and the CRMbtnLogin.PerformClick method.
  3. From the Advanced section of the Toolbox, drag and drop a DiagnosticsLog component to the automation.
  4. In the diagnosticsLog1 design block, click Message to enter unique search text.
  5. In the Message field, enter your name.
    Diagnostics
  6. In the automation, connect the automation links to include the diagnosticsLog1 component as shown in the following image.
    Connected new
  7. From the menu bar, click File > Save All to save the automation changes.
  8. From the menu bar, click Tools > Options to display the Options window.
  9. In the Hierarchy frame, expand Pega Robot and click Runtime Diagnostics.
  10. In the Available options and publishers frame, click Application Diagnostics Settings to highlight the selection.
  11. In the Configurable Properties frame, from the Level property drop-down list, select Verbose.
    Exercise Daig.
  12. In the Available options and publishers frame, click File Publisher to highlight and to update the Configurable Properties frame.
  13. In the Configurable Properties frame, from the Mode drop-down list, select On.
    Mode On
  14. On the Options window, click OK to save the changes.

2 Add breakpoints to an automation

  1. In the automation, on the automation link from CRMfrmLogin.Created to the diagnosticsLog1, right-click and select Toggle breakpoint to add a breakpoint to the automation.
  2. In the automation, add another breakpoint on the automation link between diagnosticsLog1 and the CRMbtnLogin.PerformClick. That automation should look like the following image.
    Breakpoint
  3. On the menu bar, click File > Save All to save your work.

3 Validate the log entry

  1. On the menu bar, click Debug > Start Debugging to launch CRM. When the CRMfrmLogin window is displayed, Pega Robot Studio™ activates with the CRM_E_CRMfrmLogin_Created automation that shows the first automation link with a dotted line.
  2. On the keyboard, press f11 to move the automation one step forward.
  3. On the keyboard, press Shift + f5 to continue with the process and complete the automation.
  4. From the Windows taskbar, open File Explorer.
  5. In File Explorer, in the Address bar, enter %appdata% and press Enter to open your Roaming application data directory.
    Roaming
  6. In File Explorer, double-click Pegasystems to open the folder.
    Exercise   4
  7. In the OpenSpan folder, locate the RuntimeLog.txt file.
  8. Double-click RuntimeLog.txt to open the file.
  9. If available in the open application, search for your name to display the name in the log.
    Exercise 3
  10. On the file application, close the log file application.
  11. On the menu bar, click Debug > Stop Debugging to close CRM, stop Pega Robot Runtime, and return to development mode.
  12. From the menu bar, click Tools > Options to open the Options window.
  13. In the Hierarchy frame, expand Pega Robot and click Runtime Diagnostics.
  14. In the Available options and publishers frame, click Application Diagnostics Settings to highlight the selection.
  15. In the Configurable Properties frame, on the Mode property, click Off.
  16. Optional: Remove the Diagnostic Log component from the automation.


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