Friday Fact: You can implement advanced routing scenarios by using conditional split actions inside Logic Apps

Here’s an interesting fact about Azure Integration Services that isn’t commonly discussed: How can Conditional Split with Custom Expressions inside Logic Apps, can help you implement advanced routing scenarios.

In Azure Integration Services, you can implement routing scenarios in many different ways. Each approach has advantages and disadvantages. The most common way to accomplish that is by using Azure Service Bus, but there are other ways. Without going into details about whether these capabilities we are going to describe are a better or good idea to implement, it is still a valid option.

In Azure Logic Apps, you can implement advanced routing scenarios by using conditional split actions combined with custom expressions. While most users are familiar with using basic condition statements to branch workflows, a less commonly known feature is the ability to use Azure Logic Apps’ robust expression language to create highly customized and complex conditions.

Practical Application:

For instance, you can create a Logic App that processes incoming orders. Based on the total order value, the Logic App can dynamically route the workflow. Using the greaterOrEquals function, you can evaluate if the total value exceeds a certain amount and route the order to different processing queues accordingly.

Here’s a custom expression example:

@greaterOrEquals(triggerBody()?['orderValue'], 1000)

This expression ensures that orders with a value of 1000 or more are processed differently than those below 1000.

This is a fact! You can accomplish this using the Logic App Trigger conditions. By exploring these advanced features, you can enhance the functionality and performance of your Azure Logic Apps beyond the typical use cases.

You may say that some benefits can be:

  1. Efficiency: By dynamically routing high-value orders to faster processing queues, you can prioritize and handle significant transactions more efficiently.
  2. Scalability: This method allows your Logic App to scale effectively by balancing the load based on predefined conditions and values.
  3. Customization: The use of Azure Logic Apps’ expression language offers extensive customization, enabling precise control over workflow logic.

However, this is a big disadvantage in my point of view, that is, the visibility/readability of this implementation. Which makes it hard to manage sometimes.

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 my son!

Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc. He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.

Leave a Reply

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


Back to Top