Showing posts with label ESB Dynamic BRE Resolver. Show all posts
Showing posts with label ESB Dynamic BRE Resolver. Show all posts

Tuesday, 19 July 2016

BizTalk ESB Toolkit: Two-way Request Response Itinerary process | Web Service call from ESB | Part 1


In this article, I would demonstrate how to develop a 2 way itinerary process invoking a web service. This can be achieved in 2 ways, either service request transformation at On-Ramp or at Off-Ramp. If we have to use transformation at on ramp or off ramp ESB Dispatcher component should be used in the pipeline.

Itineraries:-
Service request transformation at On-Ramp
{OnRamp[Static Resolver,Two-Way Receive Port] -->Messaging Extender[Static Map Resolver, Canonical Xform]-->Messaging Extender[Static Map Resolver, Service Request Xform]}-->Off-Ramp Extender[Static Routing Resolver] -->OffRamp[Two-Way Dynamic Send Port]
Service request transformation at Off-Ramp
{OnRamp[Static Resolver,Two-Way Receive Port] -->Messaging Extender[Static Map Resolver, Canonical Xform]}-->Off-Ramp Extender[Static Routing Resolver] -->{Messaging Extender[Static Map Resolver, Service Request Xform]-->OffRamp[Two-Way Dynamic Send Port]}
Receive Port Configurations:
Two-way receive port with WCF-Custom webHttpbinding, shown below
Dynamic Send Port Configurations
Here is a screen shot of send ports, 
Deploy the itinerary and start the application, then test the solution by placing a request through fiddler and wait the response of the process. Refer test results below, 
Conclusion
In this article, I illustrated how to develop an itinerary process to invoke web service and respond back to caller.

Monday, 18 July 2016

BizTalk ESB Toolkit: Dynamic Resolvers in ESB Itinerary Process

In this article, I would demonstrate the features of dynamic resolvers by using BREs. In previous post, we had used a static itinerary resolver, now the itinerary will be resolved dynamically by the OnRamp. And itinerary will be able to do a dynamic transformation of the message received at OnRamp then based on the transformed message we would route the message to destination system. 

ESB Flow:
{OnRamp[BRI Resolver, Receive Port] -->Messaging Extender[BRE Map Resolver]}-->Off-Ramp Extender[BRE Routing Resolver] -->OffRamp[Dynamic Send Port]

The main role of the ESB Itinerary Selector is to configure an Itinerary Resolver, and here we would use BRI resolver as shown below. 
Itinerary Resolver:

  • Rule 1: If Message from RequstorA or RequestB then Set Itinerary Name as ESB.DynamicRoutingSlip; halt and exit the BRE execution. 
  • Rule 2: if any other messages received Set Itinerary Name ESB.StaticRoutingSlip; halt and exit the BRE execution. 


BRE Map Resolver
Let’s say we receive an inbound message and we would evaluate message and select the map as show below,
  • Rule 1: If Message from RequstorA then Set Transform Type as RequestAToCanoical; halt and exit the BRE execution. 
  • Rule 2: If Message from RequstorB then Set Transform Type as RequestBToCanoical; halt and exit the BRE execution. 
Routing Resolver
This BRE would use transformed message,
  • Rule 1: If Transformed Message from RequstorA then Set End Point Outbound Transport Location and Set End Point Outbound Transport Type accordingly; halt and exit the BRE execution. 
  • Rule 2: If Transformed Message from RequstorB then Set End Point Outbound Transport Location and Set End Point Outbound Transport Type accordingly; halt and exit the BRE execution. 
Itinerary Configuration:
  • OnRamp, choose the application and then select the Receive-Port. 
  • Use the itinerary service as a messaging extender with a BRE resolver. 
  • Use the itinerary service as a off Ramp extender with a BRE resolver. 
  • In Off Ramp, choose the application and then select the dynamic port. As shown, connect all the components.
Conclusion 
In this article, I covered principles of the itinerary as well as I illustrated how to develop an itinerary process with a dynamic resolver using BREs.