BasicMasterBindings

Parent Previous Next

The BasicMasterBindings sample demonstrates a typical starter implementation of the Deployment Framework for BizTalk on a simple, single-assembly BizTalk application.


What this Sample Does

The BasicMasterBindings sample is based on the Orchestrations HelloWorld sample included in the BizTalk Server SDK.  The documentation for the BizTalk Server 2010 version of the sample application (it hasn't changed through many BizTalk releases) may be found here.  It is a simple application that picks up a file from a file system folder, runs it through an orchestration and writes it out to another file system folder.


How this Sample is Designed and Why

This sample demonstrates a typical entry-level implementation of the Deployment Framework on a BizTalk application that consists of one assembly.  It uses the Deployment Framework's environment-specific configuration features to dynamically transform a template bindings XML file into an environment-specific bindings file.  Most non-essential features are disabled in this sample.  The sample demonstrates the ease with which you can deploy and test a BizTalk project from Visual Studio, then package it as an MSI for deployment to your BizTalk servers.


The BasicMasterBindings.Deployment\EnvironmentSettings folder contains a file named SettingsFileGenerator.xml.  This is actually an Excel 2003+ spreadsheet saved in XML format.  This spreadsheet gives you a single place to store environment-specific configuration information.  During deployment, the environment-specific values are exported from the spreadsheet to a set of XML files (their filenames appear at the top of the spreadsheet).  When you deploy from Visual Studio, the Local settings are always used.  When you deploy to a server using an MSI, you can select any of the exported, environment-specific XML files.


The bindings file is named PortBindingsMaster.xml.  It is a standard BizTalk bindings file with a minor twist -- it's generic vs. specific to a particular environment.  Inside the file, you'll find tokens such as ${InvoiceOutputPath}.  Referring to the Excel spreadsheet, you'll find a corresponding row named InvoiceOutputPath.  At deployment time, a tool named XmlPreprocess will dynamically combine PortBindingsMaster.xml with the selected environment-specific XML file to produce an environment-specific bindings file named PortBindings.xml.


One extensibility feature demonstrated in the sample's BasicMasterBindings.Deployment.btdfproj project file is how to package additional files into the MSI so that they are deployed to the server along with the application binaries and other project files.  The CustomRedist target is called during MSI packaging, and in the sample it copies the files in the TestFiles folder into the MSI staging folder (defined by the $(RedistDir) MSBuild property).


Where to Find this Sample

<BTDFInstallFolder>\Samples\BizTalk2006\BasicMasterBindings or <BTDFInstallFolder>\Samples\BizTalk2009\BasicMasterBindings


NOTE: The BizTalk 2006/2006 R2 version of the sample must be prepared by running PrepareSample.bat in the Samples\BizTalk2006\BasicMasterBindings folder.


Building and Deploying this Sample

  1. Open the solution file BasicMasterBindings.sln in Visual Studio.  If necessary, upgrade the solution and projects to Visual Studio 2010 format.
  2. Build the solution and ensure that the build succeeded
  3. Deploy the application using the Deployment Framework's Visual Studio Deploy command
  4. The Deployment Framework will create an input folder at C:\DeploymentFrameworkForBizTalk\Samples\BasicMasterBindings\In
  5. Confirm that the deployment process succeeded and the application is now running in BizTalk (see the Visual Studio Output window and BizTalk Admin Console)
  6. If desired, package the application into an MSI using the Build Server MSI command


Running this Sample

  1. Copy the file SamplePOInput.xml from TestFiles into C:\DeploymentFrameworkForBizTalk\Samples\BasicMasterBindings\In
  2. Watch for an output XML file to appear in C:\DeploymentFrameworkForBizTalk\Samples\BasicMasterBindings\Out


Removing this Sample

  1. With the BasicMasterBindings.sln open in Visual Studio, use the Deployment Framework's Visual Studio Undeploy command
  2. Delete the folder C:\DeploymentFrameworkForBizTalk\Samples\BasicMasterBindings


Created with the Personal Edition of HelpNDoc: Easily create CHM Help documents