BizTalk as EAI Tool PPT

I have created this presentation to show the concept of BizTalk server as Enterprise Application Integration. And about how does BizTalk fit in the Enterprise Application Integration concepts, How does BizTalk fulfill the Security criteria, Error Handling and Business Monitoring

BizTalk_Interprise Application Integration


Installation of BTDF Deployment Tool

  • Click on below link
  • Click on GetStarted – it will download a file – “DeploymentFrameworkForBizTalkV5_7.msi”.
  • Right Click on the file and Click ‘Run as administrator’ and click ‘Yes’.
  • 1.jpg
  • If you are getting error as below – please close all visual studio windows and run again msi file.
  • 3.jpg
  • If it opens as below click ‘Next’
  • 2.jpg
  • Next select ‘I accept the terms in the License Agreement’ and click ‘Next’
  • 4.jpg
  • Default you can select for ‘Typical’
  • 5.jpg
  • Click on ‘Install’.
  • It takes one or two minutes – lets finish installation.
  • 7.jpg
  • Click finish – once installation completed.
  • 6.jpg
  • Now go to Visual Studio and open any project.
  • You can do below actions by simply clicking on the buttons. These makes deployment easy.
    • Deploy BizTalk Solution (use full for deployment in local system while developing.)
    • Un-deploy BizTalk Solution (use full for deployment in local system while developing.)
    • Partially deploy – deploys only modified components ((use full for deployment in local system while developing.)
    • Restart host instances (use full for deployment in local system while developing.)
    • Updates SSO with current settings (use full for deployment in local system while developing.)
    • Terminates all running and suspended instances (use full for deployment in local system while developing.)
    • Adds the binary output of the currently selected project to the GAC (use full for deployment in local system while developing.)
    • Creates an MSI file for server deployment. (This will be useful to deploy solution (MSI file) in another servers) or even you can use for local deployment like Export and Import.
    • 9.jpg
  • If above deployment buttons not appearing then go to ‘View’ -> Toolbars -> Deployment Framework for BizTalk.

To add a project, go to your solution file and Right Click Add ‘NewProject’.

  • 11.jpgThen Select ‘BizTalk Projects’ on left side window and Right Side window select ‘Deployment Framework for BizTalk…’.
  • Give Name and location as for your requirement and click ok.
  • 12.jpg
  • And it will open another window – there select the options (true or false) what is required in your project and click on ‘Create Project’.
  • 13.jpg
  • Then it will show a window like ‘A default deployment project is created’.
  • 14.jpg
  • It will open automatically ‘btdfproj’ file. Close that file if you don’t want to change any thing in that. It won’t appear all the files in solution but it will create files in the location you selected. So Right click on the solution or where ever you want to include in the Solution. Add ‘Existing Items’.
  • 15.jpg
  • Open folder of the project .
  • 16.jpg
  • Select all files in that and click ok.
  • 17.jpg
  • Now you can see all these below files for deployment. You can use these files and edit\add\delete as per your requirement and click on icons for deployment. It will deploy within minutes. And you can see deployment project in your BizTalk Admin Console.
  • 18.jpg
  • In these files
    • btdfproj – here you will mostly add the dll files location of schemas, maps, pipelines, pipeline components, orchestration and components, etc… Of all your projects under same solution.
    • xml – you will add mostly ‘Receive Port Bindings ‘and ‘send Port bindings’.

BizTalk Sequential Convoy

This blog is to explain about BizTalk Sequential Convoy.

What is Sequential Convoy?

Sequential Convoy is one type of BizTalk design pattern to achieve particular type of requirements. This can be defined as “A sequential convoy enables multiple single messages to join together to achieve a required result. A sequential convoy is a set of related messages that have a predefined order. Although the messages do not have to be exactly the same, BizTalk Server must receive them in a sequential order.”

Sequential Convoy also called as singleton pattern convoy.

Sample Scenario for Sequential Convoy:

My Orchestration has to receive the messages from source location and create a batch for first three messages and send to destination system.

In order to achieve this requirement, we need to make our orchestration as singleton, that means my orchestration has to receive all 3 messages using single instance (By default, Orchestration creates dedicated instance for each message)

Once my orchestration receives 3 messages, instance will be completed and new instance will be created for next 3 messages. Likewise, my orchestration has to run for ever.

Note: In order to correlate all 3 messages, we need to have common element in all messages (Example: CustomerId/OrderId..)

In real time, usually this type of scenario comes for internet banking transactions or retail orders process.

Sample Input message:

This message has to be dropped 3 times in receive location with different data.

<ns0:Billing xmlns:ns0=”http://BTSamples1.BillingAddress”&gt;


<Address1>ABC Apt</Address1>




Sample Output message:

This message is a batch of 3 input messages.


<ns0:Billing xmlns:ns0=”http://BTSamples1.BillingAddress”&gt;


<Address1>ABC Apt</Address1>




<ns0:Billing xmlns:ns0=”http://BTSamples1.BillingAddress”&gt;


<Address1>BAC Apt</Address1>




<ns0:Billing xmlns:ns0=”http://BTSamples1.BillingAddress”&gt;


<Address1>CDE Apt</Address1>




Note: In all messages we need to have a common element “CustId”.


1. Need to create a schema for incoming message and promote the common element as property promotion. Also create correlation type and correlation set on CustId.


2. Design the orchestration like below.


“Receive_1” shape receives very first message and initialize the correlation set.

“Receive_2 shape follow the correlation and receives remaining messages using the same instance created while receiving first message.

“Loop_2” shape make sure the orchestrations run for ever.

“Loop_1” shape make sure to receive maximum 3 messages for each instance and batch it.

Once max messages (3) are received, “Loop_1” will break and batched message will be sent to Destination system using “Send_1” shape.

3. Create below orchestration variables.

//Count is a variable of type “System.Int32

//Continue is a variable of type “System.Boolean”

//XmlDocVar is a variable of type “System.Xml.XmlDocument”

//StrFinal is a variable of type “System.String”

//BillingStrVar is a variable of type “System.String”

4. Create below Orchestration Messages

//XmlDocMsg is a message of type “System.Xml.XmlDocument

//BillingAddress is a message of type BillingAddress Schema

5. Keep below code in all orchestration shapes.

  • Receive_1


  • Expression_1


  • Loop_2


  • Loop_1


  • Receive_2: 


  • Expression_2


  • Expression_3


  • ConstructMessage_1


  • Send_1


  • Expression_3


6. Build and deploy the application

7. Configure the ports and start the application

8. Unit Testing: Drop couple of sample message copies in input folder with same customer id then for every 3 messages one batch file will be batched and dropped in a destination system. For example, if you drop 6 input messages, you will see 2 output messages in destination folder.



BizTalk Parallel Convoy

This blog is to explain about BizTalk Parallel Convoy.

What is Parallel Convoy?

Parallel Convoy is one type of BizTalk design pattern to achieve particular type of requirements. This can be defined as “A parallel convoy enables multiple single messages to join together to achieve a required result. The set of related messages can arrive in any order, but BizTalk Server must receive all of them before starting the process”

Sample Scenario for Parallel Convoy:

My Orchestration has to produce a customer address which is having Billing and Shipping details.

My Orchestration has to receive the Billing address details from Source A and Shipping Address details from Source B. Once both messages are received, then only my orchestration has to proceed further to produce full customer address. If any one of the addresses are not received, my orchestration has to wait till other message received.

This scenario can be achieved through parallel convoy design pattern in BizTalk.

  1. We need to create 3 schemas, Correlation type and correlation set.
  • Schema1 is for Billing Address


  • Schemas 2 is for Shipping Address


  • Schema 3 is for Full Customer Address



2. Insert “ParallelActions” shape into the BizTalk orchestration editor.

3. Drag and drop two receive shapes inside the parallel convoy shape like below


4. Create a message for Billing Address and assign to the shape “Receive_1”

5. Create a message for Shipping Address and assign to the shape “Receive_2”

6. Set “Initializing Correlation Sets” property for both receive shapes with the correlation set created in above steps.

Please note that both receive shapes are having “Initializing Correlation Sets”.

If Receive_1 shape receives the message first, then other receive shape will act as follow correlation on CustId.

If Receive_2 shape receives the message first, then other receive shape will act as follow correlation on CustId.

Once both messages are received then only It will proceed further to apply a map to produce full customer address.

7. Create a map to produce full customer address

Input messages: Billing and Shipping Addresses


Output Messages: Customer Address



Click on “OK”


8. Send the final message (Full Customer Address) to the destination system based on your requirement.

Here is the sample Orchestration view for Parallel Convoy demo.


We will talk about sequential convoy in upcoming blogs.








BizTalk Correlations

This blog is to explain about BizTalk Correlations.

What is Correlation?

Correlations can be defined as binding incoming messages with the appropriate instance of an orchestration.

Sample Scenario for Correlations:

My Orchestration has to send a request message to a Message Queue, let’s say it is “Input Queue”. Some other process takes the input message from “Input Queue” and after processing, output will be sent to another Queue, let’s say it is “Output Queue”.

Now Orchestration has to receive the message from Output Queue.

Also, my orchestration has to make sure that, it is consuming the output message of the of the correct instance.

How to Implement Correlations:

If we need to implement correlations, both input and output messages should have a common field element. For Example

Input Message:


Output Message:


Also, common element (CustId) should be property promoted.

Go to Orchestration View–>Types–>right click on Correlation Types–>Select New Correlation Type–>Correlation Properties windows appears with two panels.

Left Side Panel is “Available Properties” and the right-side panel is “Properties to correlate on:”

We need to select our property promoted field from left side panel and click on “ADD”, then field will be added to right-side panel. Using this common field, we will correlate request and response messages in the orchestration.


So far, we have created a Correlation Type.

Now we need to create a Correlation Set, which will be used in Orchestration Receive and Send shape properties.

Go to Orchestration View–>right click on Correlation Sets–>Select New Correlation Set->One Correlation set will be created.

Correlation Set properties–>you need to select correlation type which we have created above.


Now we are ready with correlation Sets.

Orchestration Properties:

In orchestration, if we want to send the message out, it will be through send shape. In send shape properties, we need to provide the “Initializing Correlation Set” property and select the correlation set which you have created in above steps.


Similarly, we need to provide “Follow Correlation Set” property in Receive shape which will be used to receive the response message. “Activate” property should be false in this second receive shape of the orchestration.


When you initialize the correlation set, one subscription id will be created for your instance in the message box and when you follow the same correlation set, using the subscription id, correct message will be received for that instance. This mechanism will be taken care by the BizTalk engine internally.

Here is the sample Orchestration view for Correlations demo.


Using these correlations, we will design Convoys (Sequential & Parallel) in upcoming blogs.








XSL, XSLT AND BizTalk Map – First Look

  • What is XSL and XSLT?
    • There is no difference between XSL and XSLT both are same and these also called XSL stylesheets. I can say these are synonyms.
    • It is a one type of Language in computer world which contains different Types of Languages. And this type of language is also called stylesheet language or functional language.
    • Like any language has its own syntax, instructions and rules for writing code\script, XSL also have its own instructions and rules.
    • XSL Format and syntax looks like same as html\xml formats.
    • You can open\create\write\edit XSL file in Notepad, notepad++, text Pad, Visual Studio, Edit Plus, like almost in all editors.
    • These stylesheets can be identified or saved as ‘.xsl’ or ‘.xslt’ extension. Visual studio defaults to ‘.xslt’ extension and some other extensions defaults to ‘.xsl’. while running you have to check which extension is suitable to your work\application.
    • The full form of XSL is ‘extensible stylish Language’ and XSLT full form is ‘extensible stylish language transformations. It simply means this stylesheet contains transformation code. In other way it transforms XML file from one format to another format.
    • As the name showing as stylish, yes, we use XSL for styling. Styling to mainly for XML documents (files). Here styling means transforming. Stylesheet mainly used to transform one xml document (one xml file) to another xml document (another xml file).
    • Generally, the input to this style sheet is called ‘source’ xml and out of this stylesheet is ‘target’ xml.
    • To run XSL\XSLT, it requires some run time. And these stylesheets you can call from almost from all the programming and scripting languages. That’s reason XSL is powerful in transformation.
  • By using XSL Stylesheets, you can
    • Assign values from one xml element to another xml element
    • Copy nodes\elements from one xml to another xml node.
    • Looping recursive xml nodes to get values of each nodes.
    • Check conditions like if condition.
    • Use Xpath\Xqury language.
    • Add constant values
    • Concatenate values
    • Inside you can call JavaScript, J#, c#, etc…
    • Etc…
  • XSLT looks like1.jpg
  • BizTalk and XSL
    • If you know little bit about BizTalk, then you must have heard about BizTalk Map, which file extension is ‘ btm’ and used to transform one message (xml) to another message (xml) in BizTalk Projects.
    • See below the Sample Btm file :-2.jpg
    • After created schemas and map, Build the Application once. After you build the application, Biztalk creates .’cs’ files in solution (physical) folder.
    • Right click on Project name -> click on ‘Open Folder in File Explorer’.3.jpg
    • You can see ‘.btm.cs’ files. This is a c# class file.4.jpg
    • Let’s see what is the inside ‘.btm.cs’ file.
    • Double click btm.cs file or open it in Visual Studio or any other editors. I opened in visual studio and I can see file as below.5.jpg
    • If you observe in the ‘.btm.cs’ file where I highlighted in the above screen that is a XSL code assigned to a ‘_strMap’ string variable in BizTalk map class file.
    • This is what I want to show you, the map whatever appearing is only GUI, back-end it is coded with c#, it’s an editor. And in run time C# class files are called and C# class file and C# class file uses XSL code for transformations.
    • And of course, it uses different functions\methods in C# to run business logic.
    • Yes, Map is a combination of C# and XSLT.


BizTalk Logical Ports & Port Bindings

This blog is to explain various ports and port Bindings in Orchestration.

There are two types of ports in BizTalk.

  • Logical Ports: Ports which are used in Orchestration
  • Physical Ports: Ports which are used in BizTalk admin console

Each logical port (Except Direct Binding) should have binding with a physical port in BizTalk admin console

Since this blog is related to orchestration stuff, let’s talk about logical ports.

There are two types of logical ports

Inbound Logical Ports:

These ports are used to receive the messages from message box to Orchestration. These are also called as Subscribers (Subscribing messages from Message box DB)

Outbound Logical Ports:

These ports are used to send the message from Orchestration to message box. These are also called as Publishers (Publishing messages to Message box DB)

How to Create Logical Ports:

  1. When you open the orchestration, you would see below screen


2. Right click on Port Surface–>Select “New Configured Port”



3. Port Configuration Wizard appears and then click on “Next”–>Provide the name of the Port (Port_AppraisalInput)–>Click Next–>Provide PortType Name as “PortType_AppraisalInput”–>Click Next

Communication Pattern:

  • One-Way—Select this option if you want to create oneway port
  • Request-Response – Select this option if you want to create two-way port.

Access Restrictions:

Choose appropriate option based on your requirement



4. Port Direction for Inbound:

For Inbound logical port, select “I’ll always be receiving messages on this port” option.

For Outbound logical port, select “I’ll always be sending messages on tis port” option.


Port Bindings are three types.

  • Specify now
  • Specify Later
  • Direct

Specify now: you need to provide URL, Adapter and Pipeline details in design time itself.


Specify Later: If you select this option, you need to provide the URI, Transport and Pipeline details in BizTalk Admin console.


Direct Binding: This is loosely coupled Binding type. There are three options in Direct Binding and by default first option is selected in the screen. If we use this option, messages are subscribed from message box using filter condition in Receive shape properties.



Self-correlating direct bound ports are self-referential. This means that a self-correlating direct bound port supplies the information that an orchestration can use to send messages back to its enclosing orchestration. Please go through the link below for more details.

Partner Orchestration:

Partner orchestration direct bound ports provide the capability of having inter-orchestration communication through ports. Please go through the link below for more details.

Port Direction for Outbound: For outbound port bindings, you can see additional option as “Dynamic”.

Please see the Dynamic send port details in the below link.




Create First BizTalk Orchestration


I need to drop a sample Xml message in a folder location.

Sample Input Xml message:

  <ns0:AppraisalInput xmlns:ns0=”http://SampleBTApp.AppraisalInputSchema”&gt;





My BizTalk orchestration should receive the message and do below validations

If Appraisal Score = 5, then Assign Grade = ‘A’

If Appraisal Score = 4, then Assign Grade = ‘B’

If Appraisal Score = 3, then Assign Grade = ‘C’

Final Output should be sent to a folder location.

Sample Output Xml message:

<ns0:AppraisalOutput xmlns:ns0=”http://SampleBTApp.AppraisalOutputSchema”&gt;







  1. Go to Start Menu–>Open Visual Studio
  2. Click on FILE menu–>New–>Project


3. Below window will be appeared and you need to provide the details for

Name: <<Name of the BizTalk Application>>

Location: <<Where you want to save the app in hard disk>>

Solution name: <<Name of the solution>>

Note: One solution might have different BizTalk projects.



4. Once you click on ‘OK’ button, below screen will be appeared under Solution Explorer.



5. Right Click on the project name “SampleBTApp”–>Add–>NewItem

6. Select Schema and provide the Schema name (Example: AppraisalInputSchema.xsd)


7. Once you click on “Add”, below screen will be appeared.


8. Rename the “Root” record to some meaningful name like “AppraisalInput”

9. Right click on AppraisalInput–>InsertSchemaNode–>ChildFieldElement


10. Once you click on “Child Field Element” below screen will be appeared.


11. Rename the “Field” to “EmpNo”. Similarly create two more fields “EmpName” and “AppraisalScore”.


12. Solution Explorer should look like below.


13. Using above steps, we need to create one more schema “AppraisalOutputSchema” with fields “EmpNo”, “EmpName”, “AppraisalScore” and “Grade”.


14. Solution Explorer should look like below.


15. Save the BizTalk application.

16. So far, we have created two schemas. Now we need to create a Map to derive the Grade of the employee based on some conditions.

17. Right click on BizTalk Application–>Add–>New Item–>Select “Map Files”–>Click on “Map” and provide the MapName


18. You can see three panels, left side panel is to specify Source Schema, right side panel is to specify destination schema and middle panel is to provide mapping details.

Click on “Open Source Schema” link and select Source schema “AppraisalInputSchema” like below.


19. Click on “Open Destination Schema” link and select Destination schema “AppraisalOutputSchema”. You can see the below screen.


20. Now we need to provide the mappings, Hold the mouse left button and drag the lines like below.


21. Now we need to provide the logic for Grade field of destination schema. Hold the mouse left button and drag the “Scripting” functoid from Toolbox to Map panel. Also provide the mapping like below.


22. Double click on Scripting functoid–>Choose middle tab (Script functoid Configuration) and select “Inline C#” from drop down list and provide the code like below.

public string Grade(string param1)


            string GradeVal = string.Empty;

            if (param1 == Convert.ToString(5))

              GradeVal = “A”;

            else if (param1 == Convert.ToString(4))

                GradeVal = “B”;

            else if (param1 == Convert.ToString(3))

                GradeVal = “C”;

                return GradeVal;



23. Click on “OK” button and Save the application.

24. So far, we have created two schemas and one map, now we need to create an orchestration.

25. Solution explorer should look like below.


26. Right click on BizTalk application “SampleBTApp”–>Add–>New Item–>Orchestration Files–>Select “BizTalk Orchestration” and provide the name (EmpGradeOrch) for the Orchestration.


27. Once you click on “Add”, you would see empty orchestration screen like below.


28. You need to place required orchestration shapes in between green and red colour buttons. Below is the list of shapes available in BizTalk orchestration. If you want to add any shape, just right click on the windowàInsert ShapeàChoose required Shape.


29. Orchestration receives the message through “Receive” Shape. So, we need to choose “Receive” shape and provide couple of properties for the shape.

30. If we want to go to properties windows, click “F4” key in keyboard or right click on “Receive“ shape and select “Properties Window”, then properties window appears like below.



31. Here you need to specify below properties

  • Activate: We need to specify the property as “True”, this property creates instance of the orchestration and this is mandatory for orchestration first receive shape. (Mandatory)
  • Description: To provide some description about the shape (Optional)
  • Following Correlation Set & Initializing Correlation Set: While using correlations, you need to specify this property (Optional)
  • Message: Need to specify the message type (Mandatory)
  • Name: To specify some meaningful name for the Receive shape.
  • Operation: Need to choose logical port name here.

32. In BizTalk orchestration, xml messages will be traversed through some message types.

Here we need to create two messages for two schemas (Input and Output).

  • Messages should be created in Orchestration view window.



  • Right click on Messages–>New Message–> Rename the message name to “InputMsg”


  • Right click on “InputMsg”–>Select “PropertiesWindow”



  • Click on “Message Type” drop down list and Expand “Schemas” and select “AppraisalInputSchema”



Same way create one more message “OutputMsg” and select the schema type as “AppraisalOutputSchema”. After this your orchestration view should look like below.


33. Now we need to create logical ports for both incoming and outgoing messages of the orchestration.

Inbound Logical Port:

  • Right click on Port Surface–>Select “New Configured Port”



  • Port Configuration Wizard appears and then click on “Next”–>Provide the name of the Port (Port_AppraisalInput)–>Click Next–> Provide PortType Name as “PortType_AppraisalInput”–>Click Next



  • Click Next –>Click Finish



Outbound Logical Port:

  • Create the Outbound Logical ports using above steps




34. Now we are ready with message types and logical ports. We need to provide these properties to Receive Shape.

35. Go to ReceiveShape properties–>click on Message Drop downlist–>Select InputMsg


Select the Operation as Inbound Logical Port like below.


Now you can see the Orchestration as below.


36. Now we are good with Receive shape properties. Next, we need to apply Map on the Input message received through Receive Shape. We need to use Transform Shape. Insert “Transform” shape under Receive Shape.


37. Transform shape properties–>Message Constructed–>Select “OutputMsg”


38. Double click on Transform shape


39. Select Radio button of “Existing Map” and select Fully Qualified Map Name.


40. Now we need to set Source and Destination messages.




Click OK.

41. So, far we have received Input message through “receive” shape and applied map on using “Tranform” shape. Now we need to send the constructed output message to Message box using Logical Outbound Port. Insert “Send” shape after Transform shape in the Orchestration.


42. Goto SendPort properties and provide Message as “OutputMsg” and choose Operation as Outbound logical port.


43. Now you can see final Orchestration window as below.


44. Now we are ready with Orchestration. Next, we need set few properties to the application. Right click on application–>Properties–>Click on Signing–>Select New–>Provide KeyFileName–>OK


45. Now Select Deployment –>Provide Application Name as “SampleBTApp”


46. Now Right click on Application–>Build




47. Right click on BizTalk application–>Deploy


48. Now we are done with development and deploy the application. Next, few settings need to be done in BizTalk admin console.

49. Start–>AllPrograms–>MicrosoftBizTalk Server 2013R2–>Select “BizTalk Server Administration”


50. Expand BizTalk Server Administration–>Expand BizTalk Group–>Expand Applications–>SampleBTApp


51. Need to Create a receive Port.

Right click on ReceivePorts–>New–>One-way Receive Port–>Provide name of the receive port–>Click on Receive Locations–>Click on New–>Provide ReceiveLocation name–>In “Type” dropdownbox, select “FILE” as adapter type–>Click on Configure–>Browse the Receive Folder where you are going to drop input message–> Click on Apply and OK–>Provide Receive pipeline as “XmlReceive”–> Click on Apply&OK

52. Need to Create a Send port

Right click on Send Port–>New–>Static One-Way Send Port–>Provide Port Name–>Type “File” (Adapter)–>click on Configure–>Browse destination folder where you want to see the output message–>Click OK–>Provide Send Pipeline as “PassThruTransmit”–>Click on “Apply&OK”.

53. Double click on Orchestration–>Bindings–> set Host and Bind Logical ports with physical ports for both receive and send.

54. Drop a sample message in Receive location and you can see the output in Destination location.