Home  >  Blog  >   Biztalk

BizTalk Server Tutorial

Rating: 4.6
  
 
7478

This tutorial gives you an overview and talks about the fundamentals of the BizTalk Server.

BizTalk Server - An Ultimate Guide for Beginners

In this BizTalk Server Tutorial, we will cover below topics

What is BizTalk Server

The business environment is getting more complicated day by day with diverse automated systems, platforms, and applications, due to the growing complexity of the market demands.

Thus, to improve business efficiency and performance, Microsoft has introduced the BizTalk server which perfectly integrates the different systems and applications for automating business processes.  

The server seamlessly aligns the enterprise systems and diverse data to simplify business processes, analyze data, and improve business efficiency.

Microsoft BizTalk Server is an Inter-Organizational Middleware System that allows business organizations to automate business processes by using customized adapters that allow effective communication between the different systems and applications that are being used within the business organizations.

Along with process automation, the BizTalk server also offers Business-To-Business communication, Activity Monitoring, and Message Broker services. 

The BizTalk server supports around 25 multiplatform adapters and stealth communication infrastructure which allow business enterprises to realize the connectivity inside and outside their operations.

BizTalk server is just like Business Process Management Solution where the Biz stands for the Business.  

Advantages of BizTalk Server

The advantages of the BizTalk Server are mentioned below:

  • BizTalk Server provides organizations with a specific solution that helps to integrate, automate and manage the business process inside or outside the business environment and multiple channels.
  • The diverse systems and applications can be effectively integrated with server adapters that support the Transport Protocol that connects the user and information. It supports Electronic Data Exchange (EDI) and Business-to-Business communication.
  • It is easy to update the information in the BizTalk server and its maintenance is a simple task. 
  • BizTalk Server can effectively manage negative scenarios. For example- If any service is down, a user can set the retry mechanism. 
  • BizTalk Server has an Enterprise Service Bus (ESB) toolkit which includes the tools that support the dynamic messaging architecture of the BizTalk Server. It is used for managing the service interaction and orchestrating existing services. 
  • BizTalk works like a hub in business that allows the transactions and information to be interchanged between the different systems, so they are able to interact with each other by using a common language. 
  • BizTalk Server can effectively establish a connection between LOB- Line of Business by using the  BizTalk LOB Adapter. This adapter allows information to flow across the boundaries. 
  • BizTalk Server can enhance communication, establish a connection and improve the collaboration between different business processes. 
  •  The MessageBoxDb supported by the BizTalk server ensures optimum performance. 
  • It supports the Service Oriented Architecture which helps businesses with service enablement and also offers platform interoperability. 
  •  With the help of BizTalk’s Business Activity Monitoring interceptor API, a user can control and streamline the processes and also manages the workflow. 
  • BizTalk Server provides users with an Advanced Sharing Platform which runs the processes on different systems.
If you want to enrich your career and become a professional in BizTalk Server, then enroll in "BizTalk Server Training". This course will help you to achieve excellence in this domain.

BizTalk Server Architecture

BizTalk Architecture has 4 main components:

Each valid message is executed from at least two of the components of BizTalk Architecture.

Receive Port: Receive the message

The receiver port is used to receive the message from the partner. BizTalk supports the different adapters that can be used for communication. 

The communication is done through the adapters like HTTP, SQL, FTP, and many more. Advanced LOB adapters can also be used for communication like WCF-SAP, and WCP-SAP. Receive Port acts as a message publisher.

The three sub-components supported are:

Receive adapter: Here, the user needs to specify the adapter that the user wants to use to communicate. According to the chosen adapter, the configuration of the required properties is done. 

Receive pipeline: After receiving the message from receive adapter, receive pipeline executes the message. There can be four different stages of the disease pipeline and every stage consists of 0 to 225  components, except the disassembly stage which has only one component.

Different stages of receive pipeline are:

  • Decode Stage:  Decodes the message. 
  • Disassemble stage: disassemble or parse the message. 
  • Validate stage: Perform incoming message validation. 
  • Resolve Party: It maps the Sender certificate or Sender Security ID to the Source PartyID.
  • Inbound Map: Once the pipeline is executed, mapping transformation can be applied to the incoming messages.  This type of mapping is used for creating a Canonical Schema. End Point Manager is liable for the map execution on the incoming message type.

Message box: Message Box is also known as the Heart of BizTalk Architecture.  Message Box has two main components – SQL Databases and Messaging Agents.

SQL databases are used to store the persistent Stage of messages, routing, etc. Messaging Agent is used for the purpose of message routing  ( message subscription, publishing, retrieval).

Receive port’s published messages are sent to the message box and then it checks for the message subscribers.

Two types of the possible subscriber are:

  • Orchestration 
  • Send Port

Orchestration (The Business Logic)

Orchestration refers to the graphical representation of business logic which means a user can graphically represent the message flow through orchestration.  This component is an option and even most of the time not required. 

This component is effective to represent complex logic. Orchestration can act as a message subscriber and publisher.

  • Send Ports: Send the port to send the message to the partner. Send Port has three sub-components.
  • Outbound maps: Before Pipeline execution, a user can apply the mapping transformation over the outgoing messages. This mapping is used for sending the message in a particular format.
  • Send Pipeline: It executes the message that the user wants to send out.  Send pipeline supports three different stages:
  • Preassemble Stage:  To execute the action before message serialization.
  • Assemble Stage: To Serialized/Assemble the message.
  • Encode Stage: To Encrypt/Encode the incoming message.
  • Send Adapter: Here, the user needs to mention the adapter that the user wants to use for communication.

MindMajix YouTube Channel

The Life Cycle of a Message

The lifecycle of a Message - First of all, Receive Location in the Receive Port receives a message and then processes it.

After the processing, receive location publishes the message to the MessageBox Database which is the major routing mechanism of the BizTalk server. 

MessageBox performs active subscription evaluation and routes the message to send ports and orchestrations having the matching subscription. 

Orchestration may perform the message processing and then publish it to the send port via MessageBox from where the message is sent to its final destination. 

Orchestration handles the process of sending and receiving messages via Message Box. Also, with the help of orchestration, a new message can be created. Messages are received by using the routing process and subscription.  

At the time when the subscription is filled for orchestration, a new instance is initiated and the message is conveyed. And if it is an instance subscription, the instance rehydration is done (if required) and then the message is conveyed. 

When the messages are conveyed through Orchestration, they are displayed on the Message Box in a similar way to the message reaching the receive location including all the necessary properties and put in the database for the routing purpose.

Though, the orchestration is actually a logical representation of the entire business process. In BizTalk, Orchestration Toolbox has included different shapes which can be used for designing the Orchestration flow for completing the process.

BizTalk Ports 

BizTalk Ports are necessary for effective communication between the components of the BizTalk server. There are two ports:

  • BizTalk Receive Ports and Receive Locations
  • BizTalk Send Ports and Send Port Groups

BizTalk Receive Ports and Receive Locations

Receive Port is a collection of more than one receive location that outlines the specific entrance point into the BizTalk server. A receive location configures the particular endpoint to receive messages.

The location includes all the information about the configuration for receive adapter and the pipeline. 

The adapter handles the communication part of receiving the message.  For example, SOAP Adapter and File Adapter; both receive messages from distinct sources.  Messages are prepared by the receive pipeline to publish it in the MessageBox. 

A pipeline is a sequence of components that are executed one by one, each component handles a specific message processing such as encryption/decryption, validation, and parsing.

BizTalk Send Ports and Send Port Groups

Send Port is an integration of Send Adapter and Send Pipeline. Send Port is actually the location where the BizTalk server sends the message or from where the server receives the message.

Send Port Group is the collection of different send ports in which the BizTalk server is used for sending messages to multiple locations in just a single configuration.

When the message is shared on the send port group, it is shared with all send ports present in the group. 

The send pipeline helps in preparing the message which is shared by the BizTalk server for broadcast to the other services. 

Send Adapter is basically used to send the message by using particular protocols such as FTP or SOAP

BizTalk Pipeline

Pipelines are an important component of the BizTalk Server that helps in implementing the pipes and filters in an integrated format. While sending or receiving the message, sometimes, it is required to perform some transformation on that message for preparing it to enter or exit the BizTalk server.

Pipelines are attached to the components through which the message is going to pass, send ports, and receive location.

After that, the data format is checked to analyze whether it needs any changes are required or not. Pipelines help to define the transformations that are necessary to be performed on the message being sent or received. 

There are two types of Pipelines:

  • Send Pipelines
  • Receive Pipelines 

BizTalk Send Pipelines: 

BizTalk Send Pipeline to process the documents before sending them to the final location.  Send pipeline processes a single message and produces a single message to send. 

Send Pipelines has three stages:

  • Pre-assembled: It processes the message before assembling it and sending it to the outbound process. 
  • Assemble: It combines the different messages into a single large message for transmitting by performing the necessary steps like adding envelopes, convert XML to flat files, or other necessary tasks.  Here, you can demote the properties from the context message. 
  • Encode: It encodes or encrypts a message in such a manner that the message should be understood by the targeted system. 

Receive Pipeline transforms the message which is going to be published to the MessageBox database. 

Receive Pipelines receive the message, transform it and then disassemble the raw data into single or multiple messages.  After that, the messages are individually proceeded by the BizTalk server. 

Receive Pipeline has four stages:

  • Decode: Decode or decrypt the message for the disassembly stage. 
  • Disassemble: It helps in generating multiple messages that are based upon the input message by disassembling the message into smaller messages.  It can recognize the incoming message format and after that processes it.
  • Validate: It validates the disassembled messages. 
  • Party resolution: It helps in identifying the party from which the Biztalk server is receiving the message.  This is done by mapping the digital certificate of send or the security identifier of the sender. 

Customize Pipeline components 

The Customized Pipeline Components  are described below:

  • IBaseComponent: IBaseCompnent is used for describing the properties which are used for providing the basic details about the component. 
  • IPersistPropertyBag: IPersistPropertyBag along with IErrorlog and IPropertyBag used for defining persistence mechanisms based on the individual. 
  • IComponentUI: IComponentUI is used for defining the methods which allow the usage of pipeline components with Pipeline Designer Environment. 
  • IComponent: IComponent is used to provide execution functionality. 

Host and Host Instances

BizTalk Host is the logical container that represents more than one BizTalk  Server runtime instance.

Hosts are basically a virtual process boundary that offers security and administrative context to run the BizTalk Application instances. After defining the BizTalk Host, you can also create its instances.  

The host is a logical representation of the windows process which executes the Artifacts of the BizTalk Server like receive ports and send ports.

Host Instances

Host instance is the physical representation of the server’s hosts. 

A host can be an isolated host or a process host. Process Host is owned and handled by the BizTalk server. An isolated host is the code of the BizTalk server which is running in a process controlled by a third party. 

A perfect example of an Isolated host can be  Information Services that manage the receive functionality and SOAP adapters and HTTP. 

Hosts are defined as a group of BizTalk Server which is a collection of more than one BizTalk server that shares MessageBoxes, Configuration, Ports, etc.

Difference between an Isolated host and an In-Process host

An isolated host should run under some other process such as Information Service whereas, the In-Process Host an individual BizTalk service.

If we talk about In-Process then it does not exists within the BizTalk Environment. Thus, Biztalk Administration Tools are unable to examine the host's status ( stopped, starting or, started). 

Insolated Hosts and In-Process Hosts are also different from each other in terms of security. In-Process Hosts run within the account that lies in the Windows group of In-Process Hosts so, unable to manage the MessageBox security context. 

Isolated Hosts are beneficial when servicing already available and going to receiving messages either from some transport protocol like HTTP or by properties means.

Thus, it is able to run only a single instance of End Point Manager. It is also responsible to receive messages from the transport protocol and then send the message through MessageBox via the EPMrun only. 

Schema

A schema describes XML document structure and its content constraints. It also describes the structure of every message that it processes and refers to the description of the structure of messages as schema. 

Structure messages are an integral part of any application but it has a certain limitation. Structure messages can be of any size, big or small, and targets a big range of data storing and back-end systems.

Systems responsible for creating and managing structured messages make use of different types of formats such as flat files and XML.

BizTalk Editor is used for the simplification of the process used to define the message schema and validate whether the message is following a particular schema or not. BizTalk Editor also performs the following tasks:

Create schemas for structured XML message

 To create a schema for Structured XML Messages follow the below-mentioned steps:

  • First, open Solution Explorer, there select BizTalk project. But, only select that BizTalk project in which you want to add a schema.
  • Click Add New Item in the Project menu.
  • Then, Add New Item-<BizTalk ProjectName> dialog box. There you’ll find the template section and then Click on Schema.
  • Enter a name for the Schema, in the Name box. After that click on Add
  • You can also press F4 to open the properties window of Visual Studio.
  • In the tree view of the schema, choose the Schema node. Then, Select Target Namespace in the properties window and type the name for target Namespace. It is essential that you first set this property in starting phase of Schema creation; avoid utilizing the default property value of Target Namespace 

Create schemas for flat-file messages.

  • Once you have created the XML messages schema, use the Schema Editor Extension property of the Schema node and enable the Flat File extension. 
  • When you enable the flat-file extension, it will add the necessary properties to different types within the schema. 
  • With these properties, users can control the translation of the file business document to and from the relevant XML business documents.  The values are stored in the XSD annotation present in the schema file. 

Generate schemas from well-formed XML Instance Data:

  • Navigate to the schema generator folder in BizTalk. 
  • From the command line, execute VBS scripts to enable the XML document. 
  • InstallWFX.bs -  to generate the schema from the well-formed XML document. 
  • Right-click on the Project. Choose Add and then Add generated items.  From the dialog box, choose the ‘Generate Schema's list item. 
  • From the drop-down menu, choose document type and specify the file location. 
  • This will allow you to generate schemas from well-formed XML Instance Data.

After the generation of schemas, you must validate message conformance to a specific Schema.

Explore Top BizTalk Server Interview Questions that help you grab high-paying jobs.

Perform design-time validation of schemas.

  • You can use the EDI XML tool for performing the design-time operation on the EDI schema and maps.  You can execute this tool from the menu displayed after a right-click on the solution explorer. Here are the steps to follow:
  • Open the Visual Studio, go to the project.  
  • To the project, add the ‘Message Schema’ which you want to validate. 
  • In Solution Explorer, right-click on the ‘Schema’ and then ‘Validate Schema’. 
  • Verify that the output window consisting a message which indicates that the operation is successful.

Following are the different types of BizTalk Schema

  1. XML Schema: The XML schema is used for defining the structure of the XML Instance Message’s Class.  This schema uses the XML Schema definition Language for defining the XML Instance Message Structure.
  2. Flat file Schema: A flat file schema is used for describing the structure of the Instance messages class that uses the flat-file format, it can be positional or delimited or a combination of both. As the XSD’s native schematic capabilities are unable to accommodate all the requirements to define flat-file instance message structure, thus, Biztalk server stores these extra details in XSD schema through its annotation capabilities.  BizTalk Server defines the set of annotation tags used to store the details.
  3. Envelope Schema: It defines the XML envelope structure which is used for the wrapping of different XML business documents into the XML instance message. For defining the Envelope Schema, you need to perform certain settings that depend upon the factors like the number of root records specified in the envelope schema.
  4. Property Schema: It is used to manage one of the two property promotion mechanisms used in the BizTalk server.  This mechanism is used to copy the particular values from instant message to message context, so the BizTalk components can access them easily.  These components are used to execute actions like message routing.  Values of prompted properties can be copied to any other direction. A property schema is a simplified form of BizTalk schema which copies the prompted properties back and forth between message context and instant message. 
  5. BizTalk Map: BizTalk Map allows the users to transform or Translate the message. Here, Translation stands for the process of changing the message format from one to another. For example- you can convert the flat file to an XML file. Transformation is the process of fetching information from one message and adding it to another.
  • For representing the transformation and translation of input instance messages to output instance messages, the BizTalk mapper graphical system is used. Biztalk mapper saves the maps as XSLT ( Extensible Stylesheet Language Transformation)  stylesheets.
  • BizTalk Mapper is present in the  Visual Studio shell. Some of the BizTalk Mapper functionalities depend upon the Visual Studio shell user interface such as you use the file, view, and edit menu the same as it is used in Visual Studio.
  • Whenever you add a new map to the BizTalk project, or open the existing one or, or reactivate the map, the Mapper gets activated.  Below the different BizTalk Mapper parts present in the Visual Studio are mentioned.

Visual Studio Mapper Utility Ribbon

BizTalk Server shares the Utility ribbon with commands related to the surface mapper. 

The Ribbon provides the information about source schema, the toggle button for the source and the destination schema, a toggle button for displaying and hiding the links out-of-scope, a toggle switch to turn on and off auto-scrolling, and the search text box.  

Source schema tree view

This view displays the main editing window of the visual studio with a grid view and destination schema tree view. The view shares the schema which provides information about the instance messages which are the mapping source. 

The link that provides the mapping details leads from the source schema tree view to the grid view and after that to the destination schema tree view. 

Destination schema tree view

This view displays the main editing window of the visual studio with a grid view and destination schema tree view.  The view shares the schema which provides information about the instance messages which are the mapping source.

The link that provides the mapping details leads into the destination schema tree view from the grid view and source schema tree view. 

Grid view

This view shares the main editing window of the visual studio with the source schema tree view present on the left side and the destination schema tree view present on the right side.

Grid view has a major role in maps definition, containing the functions and links which control the transformation of source instance message to instance message which then transforms to destination schema. 

Grid view incorporates different layers referred to as grid pages that allow users to manage the complex map in the form of a logical subdivision of mappings. 

Visual Studio Toolbox window

This view displays the functions available to use in BizTalk Maps. This view is also used as a drag-and-drop function’s scope in the grid page. 

Functions displayed in Toolbox are organized as per their categories. 

Visual Studio Properties window

This view is used along with its dialog box to analyze and set the link and function properties that the user creates for defining the maps.

When a user selects a link or function from the grid view or selects a map from the SolutionExplorerwinow;  corresponding properties of schema node, function, link or, map display in the Properties window by using the standard conventions of visual studio. 

For example - properties can be grouped together in different categories and, displayed in an alphabetic manner. 

Visual Studio Task List and Output windows

These views are used for analyzing the outcomes of compiling, validating, and testing BizTalk maps. These views can also be used to compile the source code and build other types of projects.

Along with this, a user can also communicate with the different dialog boxes.  Users usually open the dialog box to edit the complex properties. 

So, these are the different parts of Biztalk Mapper that you can use to perform the different functions. 

Message Routing

Message routing is the process to transmit a message from one place to the other. In the BizTalk Server, message routing is done by using artifacts like receive port, send port, and orchestration. 

There are two types of Message routing:

Context-based Routing

Context is a collection of metadata or properties created by the Biztalk Adapter. The context is attached to the message throughout the message lifecycle. 

When the context message properties are used for the routing, the process is referred to as context-based routing. In this process, the routing is performed on the properties read from the context.

Content-based Routing 

Content-based routing is to audit the messages and route them to the right destination or channel according to the message content. 

Content-based routing is appropriate to use if you want to avoid the routing mistake and route your message to the correct channel. 

Conclusion 

Implementation of the BizTalk server can be very helpful to remove the complexity of the business environment that comprises different processes and applications.

This server is very helpful to manage effective communication between the different applications and assure the proper functioning of all business modules. 

Microsoft BizTalk Server allows the user to connect the different software and then graphically create and modify the logic which is used by that software.

With BizTalk, information workers run the process and interact with trading partners and execute various business-oriented tasks.   

The architecture mentioned above is displaying the different components of BizTalk along with their functioning. The life cycle of the message is also discussed along with the process to send and receive the message.

In the end, the message routing process is discussed for explaining the routing mechanism of messages. 

List of Related Microsoft Certification Courses

Join our newsletter
inbox

Stay updated with our newsletter, packed with Tutorials, Interview Questions, How-to's, Tips & Tricks, Latest Trends & Updates, and more ➤ Straight to your inbox!

Course Schedule
NameDates
BizTalk Server TrainingApr 27 to May 12View Details
BizTalk Server TrainingApr 30 to May 15View Details
BizTalk Server TrainingMay 04 to May 19View Details
BizTalk Server TrainingMay 07 to May 22View Details
Last updated: 03 Apr 2023
About Author

Ravindra Savaram is a Technical Lead at Mindmajix.com. His passion lies in writing articles on the most popular IT platforms including Machine learning, DevOps, Data Science, Artificial Intelligence, RPA, Deep Learning, and so on. You can stay up to date on all these technologies by following him on LinkedIn and Twitter.

read more
Recommended Courses

1 / 15