Friday Fact: Parallel branching in Logic Apps enables asynchronous execution of multiple tasks simultaneously.

  • Luis Rigueira
  • Feb 23, 2024
  • 3 min read

Parallel branching is a concept utilized in various workflow automation systems, including Logic Apps, to enhance the efficiency and flexibility of task execution. It involves splitting a workflow into multiple branches that can execute simultaneously rather than sequentially.

When tasks are executed in parallel branches, they do not wait for each other to complete before proceeding. Instead, they run concurrently, allowing for asynchronous execution. This means that while one branch is processing a task, another branch can simultaneously execute a different task. As a result, the overall execution of the logic app becomes asynchronous, providing faster processing times and improved efficiency, especially in scenarios involving independent tasks or actions.

Add Parallel branch

Parallel execution lets workflows process independent tasks “at the same time“, which reduces overall processing time. This approach works especially well when tasks have no dependencies, such as calling multiple APIs or handling different data streams in parallel.

By using parallel branching, organizations can streamline workflows, improve productivity, and handle complex business processes more quickly and agilely.

📝 One-Minute Brief

Parallel branching in Azure Logic Apps allows workflows to execute multiple actions at the same time instead of sequentially. This Friday Fact explains how parallel branches enable asynchronous execution, helping reduce overall processing time and improve performance. When used correctly, this pattern makes Logic Apps more efficient and responsive in complex integration scenarios.

Let’s consider this straightforward example:

Parallel branch

Here, we’ve got a Logic App set up to take in a CSV input structured like so:

Name Surname    Age Country  Profession
Luis Rigueira   34 Portugal Integration Developer

We use an Azure Function to convert the CSV into JSON (this exercise was implemented using Logic App Consumption), and after this, the branching logic begins. On one branch, we transform the output into a Base64‑encoded string. Then, after a deliberate 20‑second delay, we send that encoded payload to a queue.

At the same time, the other branch initializes a variable to extract the first and last name from the message. From there, it continues by sending the response.

After sending the request, we receive a response from the Logic App almost immediately.

Postman Response

Now, if you observe the logic app’s runs, you’ll see that due to the delay we’ve applied, the logic app continues to run.

Run History

However, one branch doesn’t need the other branch to complete to provide us a response.

Run history

Finally, the delayed branch ends its task.

Run history

You can apply this concept to many scenarios by integrating external services such as APIs and other actions.

By using parallel branching strategically, you can transform a Logic App from a synchronous workflow into an asynchronous one. Keep in mind that parallel branching enables asynchronous execution, which significantly enhances the overall capabilities and performance of your Logic App.

To lazy to read? We’ve got you covered! Check out our video version of this content!

Hope you find this helpful! If you enjoyed the content or found it useful and wish to support our efforts to create more, you can contribute towards purchasing a Star Wars Lego for Sandro’s son!

Happy automating!

Author: Luis Rigueira

Luis Rigueira is a Enterprise Integration Consultant at DevScope

Leave a Reply

Your email address will not be published. Required fields are marked *

The Ultimate Cloud
Management Platform for Azure

Supercharge your Azure Cost Saving

Learn More
Turbo360 Widget

Back to Top