Running UI Flows

  1. Home
  2. Running UI Flows

Once we have created and tested a Windows recorder (V1) flow, we can run it from an event, schedule, or button. Now, in order to make this possible, you must add your Windows recorder (V1) flow to an Automated flow, a Button flow, a Scheduled flow, or a business process flow.

Prerequisites for Running UI Flows

  • Firstly, you would need the on-premises data gateway for your device to have the UI flow triggered by Power Automate.
  • Also, a work or school account.

Running your desktop

We shall now discuss the steps to run flow from an event, button, schedule, or business process flow –

  • At first, sign in to Power Automate.
  • In the second step, select My flows in the left navigation pane.
  • Select New, and then select Automated-from blank.
  • Then, give your flow a name in the Flow name box.
  • Search for “new email”, and then select When a new email arrives (V3) from the list of triggers.
  • Now, select Create, and then select New step.
  • Search for UI flows, and then select Run a UI flow for desktop from the list of Actions.
  • Further, provide the gateway information and device credentials.
  • Select the UI flow that you previously created.
  • Also, select Save to save your automated flow.
  • Lastly, test your flow by sending an email to trigger it. You will see your UI flow playing back the steps you recorded.

Run UI flows unattended or attended

Now, when we create UI flows, we can run them either an attended or unattended mode.

Unattended Mode

The unattended mode is best for applications that do not need human supervision. When running unattended, UI flows automatically signs into the target devices that run Windows 10, Windows Server 2016, or Windows Server 2019. Therefore, when the automation completes, UI flows signs out from the device and reports its activity in Power Automate. Features of unattended Flow –

  • In order to run unattended UI flows, the target machine needs to be available with all users signed out.
  • Unattended UI flows run on devices with the screen locked so that no one can see the flow while it runs.
  • Windows 10 devices cannot run unattended if there are any active Windows user sessions present (even a locked one).
Attended Mode

UI flows will use an existing Windows user session while we’re in attended mode. You may specify whether you want your UI flow to operate attended or unattended when you add it to a cloud flow. The following are some of the characteristics of the attended mode:

  • For running an attended UI flow, you need to have an active Windows user session that matches the name of the user configured for your connection. The session must not be locked.
  • Also, when an attended UI flow starts on the target machine, we recommend that you avoid interacting with your device until the run completes

Run multiple desktop flows on the same device sequentially

You can execute numerous desktop flows on one or more devices at the same time. When Power Automate is triggered to perform several desktop flows on the same device, it follows the following rules:

  • On the target device, the initial desktop flow runs.
  • Other desktop flows are queued and displayed on the desktop flows and gateway details pages as Waiting.
  • When each run is finished, it selects the next Waiting desktop flow.

Run desktop flows concurrently on Windows Server devices

On Windows Server 2016 and Windows Server 2019, several users can sign in at the same time. Power Automate takes advantage of this OS functionality to execute numerous desktop flows on such devices at the same time. This functionality allows your company to save money on infrastructure expenditures.

To take use of numerous desktop flows on a single computer, follow these steps:

  • Install the on-premises gateway and the latest version of desktop flows on a Windows Server 2016 or 2019 device.
  • Create desktop flows connections to the gateway on this device using two or more user accounts.

Troubleshoot failures

  • If your unattended desktop flow fails with the notice “Cannot create new session,” try the following steps to fix it:
    • On Windows 10, make sure your target device doesn’t have an active user session locked or unlocked.
    • Confirm that you haven’t hit the maximum number of active user sessions defined for your device on Windows Server 2016 or Windows Server 2019. If it is unable to generate new sessions, desktop flows will not be able to operate.
  • If you obtain a 502 – Bad request warning while using desktop flows on a non-English language operating system, double-check that you followed the procedures to update your desktop flows from preview.
  • Verify that the device is powered on and connected to the Internet if the gateway status is offline. You may also use this tool to troubleshoot the gateway.
  • If the status of the gateway is online, attempt the following steps:
    • Verify that the desktop flows app and services are installed and operating on your device.
    • Restart your device’s desktop flow service.

For more visit – Run UI Flows

Microsoft Exam PL-900 Free Practice Test
Menu