ESB Toolkit Tip #7: Use Business Rules to make your solution reusable and dynamic

In classic BizTalk are Business Rules not often used in solutions because they are a bit undervalued and also out of the box you can only use them in Orchestrations. With the ESB Toolkit it’s almost the other way around. The ESB Toolkit is all about creating reusable components and making your solution dynamic so at runtime is decided what to do for a specific message type. To accomplish this you use a Resolver to resolve the itinerary, map or endpoint and Resolvers that use Business Rules make it really dynamic! Business Rules also make your components reusable because in your component you don’t need to implement logic anymore that’s specific for a particular message type.

The BizTalk ESB Toolkit includes several resolvers but only the BRE and BRI Resolver use Business Rules. They can be used in the following scenarios:


Specifying Itineraries

With the BRI Resolver you can select an itinerary based on the content or properties of the received message in BizTalk. This is very useful if you want to receive multiple message types in the same location and handle them by different itineraries. This can be for example a folder but also a table in a database or a web service with multiple actions.

Pipeline ResolverConnectionString BRI Resolver Policy





Dynamic Routing

With the BRE Resolver you can dynamically route a message, based on the content or properties of the message. In this case you don’t create an itinerary for each message type but you create a generic itinerary that can handle multiple message types. With Business Rules you can decide to which location or endpoint a particular message has to be sent. Note that using the BRE Resolver for Dynamic Routing is not really suited for larger projects because in an OTAP street you have to call probably other web services in your development environment then in the production environment. In that case you have to create Business Rules Policies for each environment. For larger environments is the Sentinet Resolver more suited.

Itinerary RoutingService Properties BRE Resolver Policy




Dynamic Transformation

With the BRE Resolver you can also dynamically get a map based on the content or properties of the message . This is also very convenient when you want to create a generic itinerary for multiple message types.

Itinerary TransformService Properties BRE Resolver Policy








Custom Solutions

There are also other scenarios where Business Rules can be quite useful like for example message validation. It’s not possible out of the box but you can modify and/or extend ​the ESB Toolkit services and components to suit your specific requirements.

In the following example is the Itinerary Designer extended and an Orchestration Extender created which contains a Policy and a DocumentType property. These properties are used in a Validation Orchestration Service which validates the message by using the Business Rule Engine.

Validate And Route Itinerary



Itinerary Service Properties







See Also

For more information on how to use Business Rules in the ESB Toolkit see:

About the author

Tomasso Groenendijk lives in Netherlands and is a Solution Architect at Insight. He has over 17 years’ experience in software development and software design. Tomasso is specialized in application integration with a strong interest in the Windows Azure cloud platform. From 2014, Tomasso has been awarded four times with the Microsoft Azure MVP award. He is an active contributor to the integration community through his work on his blog, MSDN samples, TechNet Wiki and also speaking on events.

MVP profile Tomasso Groenendijk
Sentinet Product Specialist
BizTalk360 Product Specialist

Month List