Friday, March 15, 2013

First BizTalk Application

Project: Transferring a file between two folders
(This artical is mainly to the developer who is new to BizTalk Server applications.)


Before knowing BizTalk Server architecture design and its components in details, lets see a very simple project and then we will continue to learn BizTalk Server components.

Introduction
In this artical, I will teach you to how to create a very simple project to receive & send a file between tow folders. It may sounds very simple but most of the time in enterprises systems a file (mostly XML formatted file)  being transferred and manipulated by different businesses by their applications.

The objective is to create an application in BizTalk administrative console and setting up to receive an XML from one location and send that XML file to a different location.

Scenario: If an XML file come to a folder, the BizTalk Application has to pickup that file and place it into a different folder. For that you need to do the following steps.

Steps
  1. Create two folders "Source" and "Target" in "C:\BizTalk\Lab1" (create this root folder if dose not exists)
  2. Create an XML file.
  3. Open "BizTalk Administrative Console" and create an application in the name "FileController"
  4. Setup RECEIVE and SEND ports to point to the folders created in step 1.
  5. Set a filter settings in SEND port to transfer that incoming XML file to "Target" folder.
Description

Creating Folders
  • Open Windows Explorer and point to C: drive 
  • Create a folder in the name of "BizTalk" (ignore if already exists) 
  • Go into the folder "BizTalk", and create a folder in the name of "Lab1" (ignore if already exists) 
  • Go into the folder "Lab1" and create two folders inside in the names of "Source" and "Target"

Creating an XML file:
  • Open notepad and copy paste the below XML content
  • Save the file in the name of "SampleData.xml"


<?xml version="1.0"?>
<catalog>
   <book id="bk101">
      <author>Gambardella, Matthew</author>
      <title>XML Developer's Guide</title>
      <genre>Computer</genre>
      <price>44.95</price>
      <publish_date>2000-10-01</publish_date>
      <description>An in-depth look at creating applications 
      with XML.</description>
   </book>
   <book id="bk102">
      <author>Ralls, Kim</author>
      <title>Midnight Rain</title>
      <genre>Fantasy</genre>
      <price>5.95</price>
      <publish_date>2000-12-16</publish_date>
      <description>A former architect battles corporate zombies, 
      an evil sorceress, and her own childhood to become queen 
      of the world.</description>
   </book>
</Catalog>

Creating an Application in Administrative Console:
  • Start the application "BizTalk Administrative Console" by clicking on "Start > All Programs > Microsoft BizTalk Server 2010 > BizTalk Administrative Console". Note: Click on "Yes" if a dialog box with a question "Want to run under admin account?" This administrative console will look alike this
  • Expand the Applications node and right-click on that node to create new application.
  • Specify the application name as "File Controller" and click "OK" button to create application
            Note: Now you can see newly created application (File Controller) under applications list

Creating Receive Port: This section explains that how to configure the source folder (from where the files are coming in to BizTalk) via adapter. The BizTalk File Adapter has in-build capability of picking a file on its arrival automatically and sends to its subscriber (the process and/or port which register to receive that file). To configure receive port, do the following.
  • Expand "File Controller" application and select "Receive Port" node to create new receive port.
  • Right click on "Receive Port" and choose "New > One way Receive Port". Specify the port name as "SourceFileReceivePort". 
  • Select the "Receive Locations" on left-hand side options and specify the folder which we created in step 1.
    • Click on "New" receive location
    • Give the receive location name as "SourceReceiveLocation"
    • Change the Type to "File"
    • Leave receive handler (BizTalkServerApplication) & receive pipeline(PassThruPipeline) to default selected value.
    • Click on "Configure" button and specify the values as given below and click "OK"
      • Receive Folder -> "C:\BizTalk\Lab1\Source\"
      • File mask -> "*.xml"
      • Retry count -> "5"
      • Retry interval (min)  -> "5"
    • Click "OK" button in Receive Location Properties dialog box.
    • Click "OK" button in Receive Port Properties dialog box.
    • Now we have created and configured a receive port & location

Creating Send Port: This section explains how to configure the send port to store the incoming XML file into target location. Just follow the instructions below to create a send port
  • Select the "Send Ports" on left-hand side options in the nodes list under "File Controller" application.
  • Right click on "Send Port" and choose "New > Static one-way Send Port". Specify the details given below
    • Name -> "TargetFileSendPort".
    • Type -> "File"
    • Send handler -> "BizTalkServerApplication"
    • Send pipeline -> "Pass Thru Transmit"
    • Click on "Configure" button and specify details as given below
      • Destination folder: -> "C:\BizTalk\Lab1\Target"
      • File name -> "SourceFile.xml". 
      • Copy mode -> "Create New"
    • Click on "OK" button on FILE Transport Properties dialog box

Setting Filters on Send Port: This section explains how to transfer the file from Receive Port to Send Port. In this, we need to map the receive port in send port's filter settings. To do this, follow the instructions given below
  • Click on "Filters" on the left- hand side options and specify the settings as given below. Note: If you have closed the SendPort Properties dialog box accidently, just open the dialog box again by selecting  Send Port -> <Newly created send port>'s properties
    • You will see a grid on right-hand side with columns Property, Operator, Value and Group By
    • Click on "Property" column of the first row and select value "BTS.ReceivePortName".Automatically the "Operator" cell will be populated with "==" 
    • Select the "Value" cell in the grid and specify the Receive Port name which we created (not port location name). In our case, it is "SourceFileReceivePort".
  • Click on "OK" button on Send Port Properties window.
Starting newly created application
Now its time to run the application. All the applications in BizTalk server are required to be started before we use them. Follow the instruction to start the application.
  • Right-click on newly create application "File Controller" and select "Start".
  • Click on "Start" button again on the dialog box.
Note: To check whether application is running, click on the "Applications" node. Then you should see a green color play icon for the application "File Controller"  with status "Started" on right-hand side pane.

Testing "File Controller" application
Now its time to test the application. Place the XML file (SampleData.xml) in Source folder and that file should disappear. Open the Target folder and you should see that XML. 

Note: To retest, delete the file from Target folder before testing the app.

Conclusion:
This is a very simple application to step into BizTalk Server. In the next topic we will see in more details about BizTalk 2010 fundamentals for developer. 

Previous Post: Installing and Configuring BizTalk Server 2010

Thursday, March 14, 2013

Installing and Configuring BizTalk Server 2010

(BizTalk Server 2010 trial version for 120 Days)

Prerequisite

We need to have the following software/files before we proceed into installation. In this training, we are going to use local system rather using a virtual machine. If you have Virtual Machine, then download all the below listed prerequisites into virtual machine.

Don't have Virtual Machine?
If you need to download & install SQL Server & BizTalk directly into your local rather Virtual PC, then just ignore the Virtual PC section. Otherwise you need to download MSSQL Server 2008, Redistributable CAB file, and BizTalk Server into Virtual PC.

Virtual PC
           Don't have Virtual Machines? or Do you want to use Virtual Machine? It is always a better choice to learn new software. If you don't have Virtual Machine installed in your PC, you may need to download and install from

  • Windows Virtual PC 2007: It runs on Windows Vista Business, Windows Vista Enterprise, Windows Vista Ultimate, Windows XP Professional, Windows XP Tablet PC Edition, Windows Vista SP1 (Enterprise, Business, Ultimate) and Windows XP Service Pack 3 (SP3).
  • VMWare: it runs on Windows Vista, Windows 7
Note: If you need to configure your Virtual PC memory settings or any other settings:
  1. First Shutdown the virtual PC. 
  2. Locate the file (.vhd) in your local drive. Default location will be C:\Users\< Current Username >\Virtual Machines
  3. Right click on the file and choose the option "Settings". This will open a window with all default settings.
  4. Now specify all the settings you needed to install required software (you cannot change the settings if your Virtual PC is in Logged off or Hibernate mode)

SQL Server 2008 (Trial Version)

                 Click on this link to get the SQL Server Enterprise Evaluation version. 

BizTalk Server 2010 Setup

                 Click on this link to get BizTalk Server 2010 Trial Version.

Redistributable CAB File
             You may need to download prerequisites redistributable CAB file from this location if you don't have internet access.


BizTalk Server 2010


BizTalk Server 2009



BizTalk Server 2006 R2

User Account Control Settings

             If you are planning to install on Windows  7 or Windows Vista, you can simply set the user account control settings. Set "Never notify" in user account control settings. By doing this, a confirmation notification popup will not appear on screen for each and every steps in the installation.



Windows Firewall Rules: Distributed Transaction Coordinator (DTC)

The distributed transaction coordinator rules for Inbound and Outbound should be enabled in Windows Firewall. For that you need to open Server Manager (see the above section to know how to open Server Manager). Then expand the "Windows Firewall with Advanced Security" node in the tree view.


Inbound DTC Rule: All three rules in Inbound for DTC should be enabled as shown below.

Outbound DTC Rule: TCP-Out rules in Outbound for DTC should be enabled as shown below.


Component Services: Enabling DTC Service

       All the transaction in BizTalk Server are Distributed Transactions. So we need to enable the DTC Service in the both SQL Server box and BizTalk Server box. The distributed transaction coordinator service should be enabled and configured to have Network DTC Access. To verify whether DTC Service properties set correct:

1. Open the Component Services.

2. Expand the node “Component Services ->Computers -> My Computer” and select Distributed Transaction Coordinator.

3. Right-click on “Local DTC” and select “Properties

4. Select the “Security” tab and configure as despite in the picture.

Note: After the change, click on “Apply” button to start the DTC service. You may be prompted with a warning message. Say Yes to proceed

Note: You need to make sure the DTC is enabled on SQL Server side.


Roles

You need to have few roles in the server machine. The roles are

Application Server:  Provides central management and hosting of high-performance distributed business applications such as those built with Enterprise Services and .NET Framework 3.5.1

File services: Provides technologies that help you manage storage, enable file replication, manage shared folders, ensure fast file searching, and enable access for UNIX client computers.

Web Server (IIS): This role is required to expose and/or consume Web Service/WCF. Also provides a reliable, manageable, and scalable Web application infrastructure


Note: You can read more about server roles in this Microsoft post

Continue to: Installation

Wednesday, March 6, 2013

Introduction to BizTalk Server

Home

Introduction to BizTalk Server
      Microsoft BizTalk Server provides a development and execution environment that orchestrates business processes, both within and between businesses. This can handle business transactions that run as long as weeks or months. The features include the ability to define business document specifications and how these documents have to be transformed when passed between applications, and the ability to monitor and log server activity. The server provides a standard gateway for sending and receiving documents across the Internet, as well as providing a range of services that ensures data integrity, delivery, and security.

The reasons why BizTalk Server is chosen by business are:

  • The solution you build is based on commonly accepted protocols and document formats
  • Ability to integrate with the widest variety of business partners and applications.
  • Today's global marketplace dictates a need to efficiently operate 24 hours a day, seven days a week
  • Ability to integrate with the widest variety of business partners and applications.
  • There is also a need to support multiple applications on a variety of platforms, and to integrate with business partners using the Internet, extranets, business-to-business (B2B) exchanges, and other resources

Note: BizTalk Server uses XML internally to define the data and structure of your business documents, and it uses standard Internet protocols like Hypertext Transfer Protocol (HTTP) and Simple Mail Transfer Protocol (SMTP) to deliver these documents to their destinations, enabling you to interoperate with various applications running in any environment as long as those applications support Internet standards. You can send documents to BizTalk Server as Extensible Markup Language (XML), EDI, or flat files


History of BizTalk Server
BizTalk Server belongs to the Microsoft Server family.

  • 2000- Microsoft released the first version of BizTalk Server
    • Editor: Writing XML Data
    • Mapper: Translate data from source format to destination format
    • Management Desk: Tracking data
    • Protocols supported: EDI, HTTP, HTTPS, MSMQ, SMTP, and FTP
  • 2002 – Next version. Not much change
  • 2004 – Added Human Workflow Services (HWS) and Business Activity Services
    • Supported by .NET framework 1.0
    • Integrated VS 2003 support for editor and mapper
  • 2006 – Business Activity Monitor (BAM) was added. Also Health and Activity Tracking component for tracking the server status was added.
    • .NET framework 2.0 support
    • Integrated VS 2005 support
  • 2007 – Also called as 2006 R2 (Release 2)
    • Rich UI administration was incorporated.
    • .NET Framework 3.0 (WCF, WF) support
  • 2009 – Added FID support and separate FRID server
  • 2010 – Recent version.
    • Enhanced B2B and RFID capabilities
    • New intuitive & intelligent Data Map and Transformation tools.
    • An enhancement to the Secure FTP with new FTPS Adapter and an improved FTP adapter.
    • Enhancements to the IBM Hosts System Adapters
    • Adapter support for the latest application version: SAP7, Oracle eBS 12.1, J.D. Edwards 9.0, SQL Server 2008 R2, SharePoint 2010



New Visitor? Like what you read? Then please subscribe to my Blog Feed or sign up for Free Email Updates Thanks for Visiting!