In this walkthrough, I will show you how to create an ESB application where Itineraries are used to transform the message from source 850 messages to Order messages. The prerequisite of this tutorial is that you have already installed BizTalk ESB on your machine. (If not, then follow my previous blog on how to install and configure BizTalk ESB).
-
Create a BizTalk application “Contoso.VendorESB
” (you can put any name).
-
Add “Microsoft.Practices.ESB
” reference to your application.
-
Create a receive port and its respective receive location. Use FILE as a transport type and “ItenanrySelectReceiveXml
” as receive pipeline.
-
Go to the properties of “ItenanrySelectReceiveXml
”. In “Resolve Party” stage, enter the following values:
Properties | Values |
ItineraryFactKey | Resolver.Itinerary |
ResolverConnectionString | ITINERARY:\\name=Contoso; |
-
Leave other properties as it is.
-
Create Dynamic Send port and enter filter:
Microsoft.Practices.ESB.Itinerary.Schemas.ServiceName == Contoso And
Microsoft.Practices.ESB.Itinerary.Schemas.ServiceState == Pending And
Microsoft.Practices.ESB.Itinerary.Schemas.ServiceType == Messaging
-
Now that we have configured our ESB application on BizTalk administration, it’s time for some coding.
-
GoTo Visual Studio, select BizTalk projects and then select “BizTalk ESB Itinerary Designer”.
-
Name the project as “Contoso.VendorESB
”(again, you can put any name)
-
Add two more BizTalk projects “Contoso.VendorESB.Maps
” and “Contoso.VendorESB.Schemas
”.
-
Deploy both the projects as application name “Contoso.VendorESB
”.
-
Once deployed, open “Contoso.VendorESB.itinerary
” itinerary and goto Itinerary Designer properties fill following properties:
Properties | Values |
Itinerary Status | Deployed |
Model Exporter | Database |
Name | Contoso |
Required Encryption Certificate | False |
-
Select On-Ramp and add it to Itinerary designer. Go to its properties and add the following values:
Properties | Values |
BizTalk Application | Contoso.VendorESB |
Extender | On-Ramp |
SendPort | Receive Port name which you have specified for “Contoso.VendorESB ” application in BizTalk console. |
-
Select Off-Ramp and add it to Itinerary designer.Go to its properties and add the following values:
Properties | Values |
BizTalk Application | Contoso.VendorESB |
Extender | Off-Ramp |
SendPort | Send Port name which you have specified for “Contoso.VendorESB ” application in BizTalk console. |
-
Then select “Itinerary service” shape and add it to designer. GoTo Itinerary service properties and add values to following properties:
Properties | Values |
Container | Select OnRamp -> Receive Handlers |
Itinerary Service Extender | Messaging |
Service Name | Microsoft.Practices.ESB.Services.Transform |
-
Add resolver to this “Itinerary service” shape and fill the values of following properties:
Properties | Values |
Resolver Implementation | STATIC |
Transform Type | Select your map which is supposed to use for transformation |
-
Now add another “Itinerary service” shape, go to its properties and fill the following values:
Properties | Values |
Container | Select OnRamp -> Receive Handlers |
Itinerary Service Extender | Messaging |
Service Name | Microsoft.Practices.ESB.Services.Routing |
-
Add resolver to this “Itinerary service” and add the following values to its properties:
Properties | Values |
Resolver Implementation | STATIC |
Transform Type | None |
Transport Location | Path of your input file e.g. C:\Users\… |
Transport Name | FILE |
-
Again add “Itinerary service” shape, go to its properties and fill the following values:
Properties | Values |
BizTalk Application | Contoso.VendorESB |
Itinerary Service Extender | Off-Ramp Extender |
Transport Location | Specify output file path e.g. C:\Users\… |
Transport Name | FILE |
-
Add another “Itinerary service” shape, go to its properties and fill the following values:
Properties | Values |
Off- Ramp | Select Off-Ramp Send Handlers |
-
Arrange the shapes as given below:
-
Right click on Itinerary designer, click on “Auto layout model” and then on “Export model”.
Once deployed, test your application.