IT tutorials
 
Applications Server
 

BizTalk Server 2009 : BizTalk Applications, Important Deployment Artifacts

12/5/2012 5:30:27 PM
- How To Install Windows Server 2012 On VirtualBox
- How To Bypass Torrent Connection Blocking By Your ISP
- How To Install Actual Facebook App On Kindle Fire

10.1. BizTalk Applications

The BizTalk application becomes the primary scope when dealing with deployment. Remember, the purpose of a BizTalk application is to group BizTalk artifacts. Figure 1 depicts a BizTalk application along with the artifacts associated with it.

Figure 1. BizTalk application and associated artifacts

You can perform the following actions on a BizTalk application:

  • Enumerate, add, and remove BizTalk artifacts from a BizTalk application. Table 1 shows BizTalk resource artifacts that can be associated with a BizTalk application.

  • Export or import all the BizTalk artifacts related to a single business solution encompassed in a BizTalk application to an MSI file.

  • Start or stop all the BizTalk artifacts that can be enlisted, started, unenlisted, and stopped within a BizTalk application.

  • Create or remove dependencies between BizTalk applications by adding or removing references from one application to another.

Table 1. BizTalk Application Resource Artifacts
ArtifactFully Qualified Resource TypeDescription
.NET assemblySystem.BizTalk:AssemblyAll .NET assemblies that are used within the BizTalk application.
BAM definitionSystem.BizTalk:BamAll BAM definition files used within the BizTalk application.
BizTalk assemblySystem.BizTalk:BizTalkAssemblyAssembly that contains BizTalk schemas, maps, orchestrations, or pipelines.
BizTalk binding fileSystem.BizTalk:BizTalkBindingXML files that contain a snapshot of the binding as seen at that instant. It does not contain details about the completeness of the binding with respect to the orchestration.
Security certificateSystem.BizTalk:CertificateBizTalk artifact used to verify the identities and to establish secure communications. Certificates are associated to ports.
COM componentSystem.BizTalk:ComCOM components that are used by the BizTalk application.
Ad hoc fileSystem.BizTalk:FileAny file that is used by the BizTalk application or that provides information about the BizTalk application.
Post-processing scriptSystem.BizTalk:PostProcessingScriptScripts that are executed after a BizTalk application has been installed on a host instance.
Pre-processing scriptSystem.BizTalk:PreProcessingScriptScripts that are executed before a BizTalk application has been installed on a host instance.
Policy or ruleSystem.BizTalk:RulesXML files that contain all the different policies and rules contained in the BizTalk rule engine.
Virtual directorySystem.BizTalk:WebDirectoryAny IIS virtual directories that must deploy on the target machine to allow the BizTalk application to function properly.

BizTalk 2009 requires all BizTalk artifacts (outside of policies and dependent assemblies) to belong to a BizTalk application. When configuring a BizTalk Server Group, a default BizTalk application named BizTalk Application 1 is created. BizTalk artifacts are deployed to this default BizTalk application in the following situations:

  • When upgrading a BizTalk Server 2004 to BizTalk Server 2009. All the BizTalk 2004 artifacts will be found under the default application.

  • When deploying BizTalk artifacts using the deprecated BTSDeploy command-line tool.

  • When deploying BizTalk assemblies using Visual Studio 2008 without specifying an application name in the deployment configuration properties.

  • When creating ports using the deprecated BizTalk Explorer in Visual Studio.

  • When adding BizTalk artifacts using the BTSTask command-line application without specifying a BizTalk application name.

  • When importing an MSI file using the BTSTask command-line application without specifying a BizTalk application name.


2. Important Deployment Artifacts

In this section, you will learn about binding files and processing scripts. These two artifacts play a vital role in deploying and managing BizTalk applications. After reading this section, you may still wonder when these artifacts come into play upon deploying applications. We will cover this in more detail when we discuss deployment scenarios. For now, the most important thing is for you to understand what binding files and processing scripts are.

2.1. Binding Files

Binding files are XML files describing the different BizTalk artifacts stored in the BizTalk Management Database and the relationship between these artifacts. Binding files are useful because they provide a way for an administrator to export the settings from a BizTalk Server Group, modify them if necessary for the next environment, and import them to another BizTalk Server Group. You can choose to export all the information related to a BizTalk Server Group, or a BizTalk application, or a specific BizTalk assembly.

The easiest way to understand what binding files are and what they look like is to export one from an existing BizTalk application and to look at its content. One of the ways to export a binding file is to open the BizTalk Server Administration Console, right-click a BizTalk application, and select the Export => Bindings context menu item. When the Export Bindings window appears, simply select where you want to export the binding file and that you want to export the bindings for the currently selected application only. Open the exported file in a text editor. You should see an XML document similar to the partial binding file shown in Listing 1.

Example 1. Partial Binding File
<?xml version="1.0" encoding="utf-8"?>
<BindingInfo
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
   Assembly="Microsoft.BizTalk.Deployment, Version=3.0.1.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35"
   Version="3.5.1.0"
   BindingStatus="FullyBound"
   BoundEndpoints="2"
   TotalEndpoints="2">
  <Timestamp>2009-04-15T17:44:04.9787774-07:00</Timestamp>
  <ModuleRefCollection>
    ...
  </ModuleRefCollection>
  <SendPortCollection>
    ...
  </SendPortCollection>
  <DistributionListCollection>
    ...
  </DistributionListCollection>
  <ReceivePortCollection>
    ...

					  

</ReceivePortCollection>
  <PartyCollection>
    ...
  </PartyCollection>
</BindingInfo>

There are five important XML elements under the BindingInfo document element:

  • ModuleRefCollection: Declares all the BizTalk assemblies and orchestrations used within the application. It also specifies which physical ports are used for each orchestration.

  • SendPortCollection: Contains all the information necessary to create or update all the send port groups.

  • DistributionListCollection: Contains all the information necessary to create or update all the send port groups.

  • ReceivePortCollection: Contains all the information necessary to create or update all the receive ports and receive locations.

  • PartyCollection: Contains all the information necessary to create or update all the parties.

Please refer to the product documentation for the full list of attributes and elements available in a binding file. If you need to validate binding files, you can generate the XML schema for binding files by running the following command in the Visual Studio 2008 command prompt:

xsd.exe "C:\Program Files\Microsoft BizTalk Server 2009\
Microsoft.BizTalk.Deployment.dll" /type:BindingInfo

The XML schema will be generated in the directory where the command was run, and then the validation can be performed (including through the BizTalk Editor).

2. Processing Scripts

Processing scripts are scripts or executables that are run when installing, importing, or removing a BizTalk application. Table 2 displays the different types of files that can be used as processing scripts. Pre-processing scripts run at the beginning of an import or installation process. Post-processing scripts run at the end of an import or installation process.

Table 2. Valid Processing Script Files
Scripts or ExecutablesExtension
MS-DOS application.com
Application.exe
MS-DOS batch file.bat
Windows NT command script.cmd
VBScript script file.vbs, .vbe
JScript script file.js, .jse
Windows Script Host setting and Script file.wsh, .wsf

Processing scripts are useful to perform simple or complex operations to reduce the number of manual operations that must occur when installing or removing a BizTalk application.

Here are a few examples showing what you can do with processing scripts:

  • Create a directory structure.

  • Create a database.

  • Register COM components.

  • GAC .NET components.

  • Start or stop BizTalk applications.

  • Enlist, start, stop, or unenlist ports and orchestrations.

Listing 2 shows the content of a pre-processing script used to create and remove a directory structure when installing and removing a BizTalk application.

Example 2. Directories Preprocessing Script
REM Creates and Removes Directories to receive or
REM send files

@setlocal
REM ### For verifying BTAD_* environment variables when script is called.
set LogFile=C:\PROBIZTALK\Log.txt

echo Script Log %DATE% %TIME% > "%LogFile%"
echo Install Directory: %BTAD_InstallDir% > "%LogFile%"
echo Install Mode: %BTAD_InstallMode% > "%LogFile%"
echo Change request action: % BTAD_ChangeRequestAction% > "%LogFile%"

REM ### Create directories prior to BizTalk assembly deployment
if "%BTAD_InstallMode%"=="Install" AND "%BTAD_ChangeRequestAction%"=="Update" (
             REM ### Create the folders which will drop messages
             mkdir %BTAD_InstallDir%\TestDocuments\In\
             mkdir %BTAD_InstallDir%\TestDocuments\Out\
)

REM ### Remove directories after undeploying at the end of uninstallation process
if "%BTAD_InstallMode%"=="Uninstall" AND "%BTAD_ChangeRequestAction%"=="Delete" (
     del %BTAD_InstallDir%\TestDocuments\ /s /q
)

REM ### Return exit code of 0 to indicate a success.
echo Script Executed sucessfully > "%LogFile%"
exit /B 0
@endlocal

					  

As you can see, Listing 2 uses several environment variables containing a context for a script developer. Some variables can be set by a developer, and others are set by the BizTalk Server Installer. Refer to Table 3 for the complete list of the environment variables accessible through processing scripts and their description. Table 4 displays the values for the environment variables set by the BizTalk Server Installer at different stages of the installation or uninstallation process.

Table 3. Processing Script Environment Variables
Environment VariableDescription
BTAD_ChangeRequestActionSpecifies whether the installer is creating, updating, or removing BizTalk artifacts. The possible values are

Create: Imports or installs artifacts without overwriting previous ones

Update: Imports or installs artifacts overwriting previous ones

Delete: Deletes artifacts
BTAD_HostClassSpecifies whether the operation is being applied on the BizTalk Management Database or on the BizTalk host instance. The possible values are

ConfigurationDb

BizTalkHostInstance
BTAD_InstallModeSpecifies whether a BizTalk application is being imported, installed, or uninstalled. The possible values are

Import

Install

Uninstall
BTAD_InstallDirSpecifies the installation directory of a BizTalk application.
BTAD_ApplicationNameSpecifies the name of a BizTalk application. If the name was not provided when launching the BizTalk Server Installer, it will contain the default BizTalk application name.
BTAD_SilentModeSpecifies options for running the script in silent mode. The most commonly used values are

0: Does not change the user interface (UI) level.

1: Uses the default UI level.

2: Performs a silent installation (the default).

3: Provides simple progress and error handling.

4: Provides authored UI; suppresses wizards.
BTAD_ServerSpecifies the name of a SQL Server instance hosting the BizTalk Management Database for a group.
BTAD_DatabaseSpecifies the name of the BizTalk Management Database for a group.

Table 4. Environment Variable Values at Different Deployment States
Deployment StateBTAD_Change RequestAction ValuesBTAD_InstallMode ValuesBTAD_HostClass Values
Import without flagCreateImportConfigurationDboverwrite
Import with flagUpdateImportConfigurationDboverwrite
InstallUpdateInstallBizTalkHostInstance
UninstallDeleteUninstallBizTalkHostInstance
Import rollbackDeleteImportConfigurationDb
Install rollbackDeleteInstallBizTalkHostInstance
 
Others
 
- Microsoft Dynamic GP 2010 : Automating Dynamics GP - Automating processes with Macros
- Microsoft Dynamic GP 2010 : Automating Dynamics GP - Speeding up month-end close by Reconciling Bank Accounts daily
- SharePoint Applications Using Windows Azure : Create a SharePoint List and Add an Event Receiver That Calls a Windows Azure WCF Service
- SharePoint Applications Using Windows Azure : Create and Deploy a Silverlight Web Part That Consumes the WCF Service
- Administering Active Directory Domain Services : Delegation and Security of Active Directory Objects (part 2)
- Administering Active Directory Domain Services : Delegation and Security of Active Directory Objects (part 1)
- Microsoft Dynamics AX 2009 : Creating configuration documents using Word
- Microsoft Dynamics AX 2009 : Creating Word documents from templates
- SharePoint Applications Using Windows Azure : Create a Web Part That Uses the Windows Azure WCF Service
- SharePoint Applications Using Windows Azure : Create a WCF Service and Deploy It to Windows Azure
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
programming4us programming4us
 
Popular tags
 
Video Tutorail Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 Adobe Indesign Adobe Flash Professional Dreamweaver Adobe Illustrator Adobe After Effects Adobe Photoshop Adobe Fireworks Adobe Flash Catalyst Corel Painter X CorelDRAW X5 CorelDraw 10 QuarkXPress 8 windows Phone 7 windows Phone 8 BlackBerry Android Ipad Iphone iOS