Lab 11 Optional Practice Error Handling
Lab 11 Optional Practice Error Handling
Automation in a Day
Lab 11 – Error handling (Optional)
30 mins
June 2022
This document is provided “as-is.” Information and views expressed in this document, including
URL and other Internet Web site references, may change without notice. You bear the risk of
using it. Some examples are fictitious and are for illustration only. No real association is intended
or inferred. This document does not provide you with any legal rights to any intellectual
property in any Microsoft product. You may copy and use this document for your internal
reference purposes.
On block error action on the desktop flow acts like the Scope action in cloud flows. When an
exception occurs in a block, we can configure it to perform subsequent actions like a Subflow.
This ensures all the exceptions are caught and handled gracefully. As a result, your automations
become much more resilient and robust.
This lab we will walk you through how to do Error handling in desktop flow
3. Under Variables, drag Set variable from the left drop down list to the right.
8. Now we will create a new error handling rule. Search on block on the search bar and
drag the On block error action to the canvas list under the first step.
12. Under System, drag Run application to the canvas list under step 2.
25. Now let us write what should happen in the exception_handler subflow. In this exercise
we will just display the ErrorLocation value supplemented with details about the last
exception. In the future you can create any of your own error handling logic. Go to
exception_handler subflow.
Note: you need to close all opened Contoso Invoicing apps page before testing the desktop
flow.
Note: you need to close Contoso Invoicing app before you close the message box.
33. Now let us see what the expected behavior from cloud flow side is. Navigate to
https://powerautomate.microsoft.com
36. Name the flow Call PAD – Exception Handling. Select Manually trigger a flow. Then
click Create.
38. Select Run a flow built by Power Automate for desktop using search bar.
Note: if your cloud flow run did not report as failed, it could be because you do not have the
latest Power Automate for desktop version (v2.6 or later). In that case, please update to the
latest Power Automate for desktop and re-test.
5 mins
1. You need to close all opened Contoso Invoicing apps page before testing the desktop
flow.
A. True
B. False
Answer: A. True - Contoso Invoicing application will automatically start when your
desktop flow starts running
2. To create an error case for this lab we will manually _______ the application so the
following step cannot locate the window anymore.
A. Open
B. Close
C. Either A or B
D. None of the above
Answer: B. Close – Once we close the application, our desktop flow cannot locate the
window anymore
3. If your desktop flow run did not report as failed on step 46, it could be because you
_______.
A. You do not have the latest Power Automate for desktop version (v2.6 or later)
B. You do not have the latest Power Automate for desktop version (v2.4 or later)
C. None of the above
Answer: A. You do not have the latest Power Automate for desktop version (v2.6 or later)