Let’s start with understanding the basics.
Differentiating Timeout and Retry in Desktop Flows
Timeout: Timeout is a specified period within which a certain operation must be completed. If the operation does not finish within the specified period, the system will consider it failed, causing a process interruption.
Retry: Retry, on the other hand, is the configuration that enables a failed operation to attempt to execute again. It can be configured to occur a particular number of times before the task is considered failed.
These two configurations are significant for achieving reliability and resilience in your automation, minimizing the chances of failures due to system delays or temporary issues.
Configuring Timeout in Desktop Flows
To configure the timeout in desktop flows, you must specify the “Timeout” property for actions where there may be a delay in response. For example, consider that a flow is created where a user needs to sign in to an application. In this case, the ‘Enter keystrokes’ action may need to wait for the sign-in page to completely load before it can input the username and password. This is the scenario where ‘Timeout’ plays a crucial role.
You can specify the timeout value in units of milliseconds, therefore if you want to set the timeout as 15 seconds, you would set the value as 15000.
Configuring Retry in Desktop Flows
Configuring retry is useful for scenarios where an action could fail due to some transient issues. For instance, consider a scenario where your flow is supposed to download a file from a website, but the website is temporarily unresponsive. In such a case, configuring the action to retry can help to ensure the flow does not fail because of this temporary issue.
To configure Retry, you would set the ‘Retry up to’ field for the action. This field can be set in units of seconds, therefore if you want the action to be retried up to 1 minute, you would set the field value to 60.
Let us assume, we set the ‘Retry up to’ field as 3 times and the delay between each retry as 5 seconds, then when the action fails, it will be retried after 5 seconds, if it fails again, it will again wait for 5 seconds and then retry. This will be done up to 3 times.
It’s important to note that these settings are there to help improve the runtime reliability of your automations and to handle scenarios where transient failures could cause an action to fail momentarily. However, they should be used judiciously keeping in mind the nature of your flows as unnecessary retries and long timeouts could lead to longer runtime and inefficient flows.
Remember, the key is to strike a balance based on the requirements of your specific scenarios. Each action in a workflow should be reviewed, and these configurations should be set after considering the nature of the action and its dependency on the response of external systems.
By understanding how to configure timeout and retry in desktop flows, you are well on your way to mastering the art of creating robust and resilient automations with Microsoft Power Automate
Practice Test
True or False: Constructing a delay within the desktop flow can be achieved by setting up a timeout configuration.
• True
• False
Answer: True
Explanation: Setting up a timeout configuration helps in delaying a specific part of the flow thereby managing the flow execution timeline better.
Which of the following are types of delays that can be configured in a desktop flow for Power Automate?
• a) Fixed delays
• b) Dynamic delays
• c) Random delays
• d) None of the above
Answer: a) Fixed delays, b) Dynamic delays
Explanation: Fixed and dynamic delays can be configured in a desktop flow for efficient processing. However, random delays cannot be set up.
True or False: In Power Automate, you can set the maximum number of retries for a step in a desktop flow.
• True
• False
Answer: True
Explanation: In Power Automate, while setting up your flow, you can specify the maximum number of retries for a step if it fails.
In Power Automate, the timeout and retry settings can be configured:
• a) At the level of the entire flow.
• b) At the level of each step in the flow.
• c) Both A and B
• d) Neither A nor B
Answer: c) Both A and B
Explanation: In Power Automate, timeout and retry settings can be configured either at the level of the entire flow or at the level of each individual step in the flow.
True or False: Automatic retry for failed steps is a standard feature in Power Automate Desktop flows.
• True
• False
Answer: True
Explanation: Power Automate Desktop flows provide the capability to automatically retry failed steps according to the configured retry settings.
A ______ timeout setting can be used to stop a desktop flow after a given time limit, regardless of whether it has successfully completed all steps.
• a) Global
• b) Dynamic
• c) Random
• d) All of the above
Answer: a) Global
Explanation: The global timeout setting is used to stop a desktop flow automatically after the specified period of time has passed.
True or False: It is possible to configure different retry settings for different steps in a desktop flow.
• True
• False
Answer: True
Explanation: Indeed, Power Automate allows you to apply unique retry settings for each step in a desktop flow, providing greater flexibility in managing the flow.
The retry on failure feature in Desktop flows:
• a) Automatically retries the flow if it fails
• b) Requires manual intervention to retry the flow
• c) Doesn’t work consistently
• d) Can only be applied to the whole flow, not individual steps
Answer: a) Automatically retries the flow if it fails
Explanation: The retry on failure feature is designed to automatically conduct retries whenever a failure occurs in the flow.
True or False: In Power Automate, there is a fixed limit to the number of retries you can set for any step.
• True
• False
Answer: False
Explanation: There is no fixed limit set by Power Automate for retries. The number of retries is entirely configurable according to the user’s discretion.
Any failure during the retry operation in a desktop flow:
• a) Stops the complete flow immediately
• b) Is ignored and the flow continues
• c) Triggers another retry
• d) None of the above
Answer: c) Triggers another retry
Explanation: If a failure occurs during the retry operation, the desktop flow triggers another retry operation based on the set configuration.
Interview Questions
What is the default timeout for Web actions in Power Automate’s desktop flows?
The default timeout for Web actions in Power Automate’s desktop flows is 30 seconds.
How can you adjust the timeout for a specific action in a desktop flow?
You can adjust the timeout for a specific action in a desktop flow by using the Timeout property on the action properties panel.
What is the maximum number of retries allowed for a desktop flow action in Power Automate?
By default, the maximum number of retries for an action is 2 times, but it can be adjusted according to the requirement.
What is the purpose of setting a retry policy in desktop flows?
A retry policy helps to automatically retry an action in case it fails initially due to an error or an unexpected situation, enhancing the robustness of the flow.
Can you set different retry intervals for different actions in the same desktop flow?
Yes, you can set different retry intervals for different actions in the same desktop flow via the Retry interval property in the properties pane of each action.
If an action fails within a desktop flow, what is the default action in Power Automate?
If an action within a desktop flow fails, Power Automate’s default action is to try the action again up to 2 more times at 30 seconds intervals.
What are the steps to configuring a retry policy in a desktop flow?
To configure a retry policy in a desktop flow, select the flow action and go to the properties pane. From there, adjust the Retry count and Retry interval properties as needed.
What is the unit of measurement for the Retry interval in Power Automate’s Desktop flows?
The unit of measurement for the Retry interval in Power Automate’s Desktop flows is seconds.
How does the ‘Timeout’ property help in handling errors in Desktop flows?
The ‘Timeout’ property allows actions to be halted after a certain amount of time if they do not complete, which helps in preventing flows from running endlessly in case of issues or unresponsive applications.
Can timeouts and retries be configured at the flow level in Power Automate’s Desktop flows?
No, timeouts and retries are configured at the individual action level and not at the flow level.
What happens if an action in a desktop flow fails and no retry is configured?
If an action in a desktop flow fails and no retry is configured, the flow will stop and an error will be logged in the flow run history.
What happens when the Retry count is set to zero in a Power Automate desktop flow?
When the Retry count is set to zero in a Power Automate desktop flow, it means the action will not be retried at all if it fails.
What is the maximum value that can be set for the Timeout property in a desktop flow?
The maximum value for the Timeout property is 86400 seconds, equivalent to 24 hours.
If an action’s retry count is exceeded, how does Power Automate handle the situation?
If an action’s retry count is exceeded, Power Automate will stop executing the flow which will end the run and log an error in the flow’s run history.
Do all actions in desktop flows support the configuration of timeout and retry policies?
Yes, all actions in desktop flows support the configuration of timeout and retry policies, providing control and reliability to the flow actions.