BizTalk Dynamic Brokering Message Sample

This solution is a very simple Dynamic Broker message but uses a lot of interesting BizTalk Server aspects.
Project
You can extend this idea for more complex BizTalk Server dynamic brokering solution.
In order to resolve this problem I used only BizTalk artifacts, in this case I have thought to use BRE, Business Rule Engine, that I consider to be the more interesting part to use to create a BizTalk solution based on dynamic rules.
How it works.
This example offers the possibility to send any type of information, from any type of source, simply defining the entity source and its rules of shipment dynamically.
The message is received by the receive location, this BizTalk port uses a pipeline of pass-through in order receiving any type of information, this pipeline set a property named DESTINATION, this property defines the name of the policy that will set up all the parameters of shipment.

schemadestination
In order to promote the property I have used the custom pipeline component named PropertyPromotionComponent, you can download this component HERE to this address, if you prefer you can develop your own component
pipeline

Inside BRE I have defined the policy named FILE, that takes care to set up the shipment parameters, in this case I set a simple parameter,
bre

In this case the rule is always true but we can extend as we prefer and this rule set the value of BaseTypeAddress field with the destination path.
I have created an orchestration that receives the messages and it takes care to set up the properties of the dynamic port, clearly we can use the same principle to change al behaviors of our process in the orchestration.

orchestration

The important aspect is to call the BRE Policy dynamically, in this way we will be totally open to extend the solution.

Here the code that I have used in order to call the rule.
cde

The rule pass the message used by the orchestration to set all of its behaviors and artifact, in this case only the dynamic port.

schemaproperties

This example is very simple but it present the idea to create a dynamic brokering message system using a pure BizTalk Server solution.
You can use this sample and extend the idea for any type of BizTalk dynamic solutions.

You can download the sample here.

Related blog posts