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

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.

This parallel execution allows for the concurrent processing of independent tasks or actions, resulting in reduced overall processing time. Parallel branching is particularly valuable in scenarios where tasks can be executed concurrently without dependencies on each other, such as calling multiple APIs or processing diverse data streams. By leveraging parallel branching, organizations can streamline their workflows, increase productivity, and effectively handle complex business processes with greater speed and agility.

Let’s consider this straightforward example:

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’ve incorporated an Azure Function to convert this CSV into JSON. Here’s where the branching happens: On one side, we’re transforming the result into a base64 encoded string. With a deliberate 20-second delay, we’re sending that encoded string as a message to a queue once the delay is over.

Meanwhile, on the other side, we’re initializing a variable to extract the first and last name of the individual, then proceeding with a response.

After sending a request, you’ll notice that we promptly receive the response from the logic app.

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.

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

Finally, the delayed branch ends its task.

You can apply this concept to a wide range of scenarios, incorporating various external services such as APIs and other relevant actions.

By strategically utilizing parallel branching, you have the power to transform your Logic App from a synchronous process into an asynchronous one. Remember that asynchronous execution enabled by parallel branching can significantly enhance the capabilities 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 *

turbo360

Back to Top