Amit 的个人资料All about BizTalk Server...照片日志列表 工具 帮助

日志


12月15日

BizTalk Server 2009 and ESB Guidance CTP 2.0

BizTalk Server 2009 beta is now available on Microsoft connect

BizTalk Server 2009 brings you some new functionality like

·         Support for

o   Windows 2008 Server

o   Windows Server 2008 Hyper-V

o   Visual studio 2008 SP1

o   .NET Framework 3.5 SP1

o   SQL Server 2008

·         Also BizTalk 2009 now comes with a new UDDI services which is based on UDDI 3.0 standards

·         BizTalk RFID Mobile is also available

 

There are some other enhancements too…

I installed BizTalk Server 2009 on Windows Server 2008 with Visual Studio 2008 SP1 and SQL Server 2008, and the setup was pretty smooth.

ESB Guidance CTP 2.0 is also out..

12月20日

How to get the status of running orchestration instances..

When you have long running business processes which runs for days, months and years, they tends to get dehydrated many a times.

There are many times when we want to get the status of running business processes, where it is, at which state it is dehydrated, at which point is it in the whole business process etc.  By status here, I mean different things like

·         At which stage of the business process the running instance is.

o   For ex.. Is the PO approved by Manager and if it is escalated Sr. Manager etc.

·         In which state the instance is

o   Ready To Run

o   Active

o   Etc…

·          At which shape the running instance is dehydrated.

 

Knowing at which stage of the Business Process is the running instance?

You can know at which stage your business process is, by implementing BAM. While creating the BAM view create a Progression Dimension. For more on how to create a Progression Dimension see the BizTalk Server 2006 Tutorials àTutorial 5 Business Activity Monitoring àCreate Progression Dimension

See details here

http://msdn2.microsoft.com/en-us/library/aa578100.aspx

 

Knowing at which State the running instance is?

WMI is a very power tool for managing BizTalk related things. These things can be done very easily using WMI. For example the following code Displays all the running instances and there state.

using System;

using System.Management;

using System.Windows.Forms;

 

namespace WMISample

{

    public class MyWMIQuery

    {

        public static void Main()

        {

            try

            {

                ManagementObjectSearcher searcher =

                    new ManagementObjectSearcher("root\\MicrosoftBizTalkServer",

                    "SELECT * FROM MSBTS_ServiceInstance");

 

                foreach (ManagementObject queryObj in searcher.Get())

                {

                    Console.WriteLine("-----------------------------------");

                    Console.WriteLine("MSBTS_ServiceInstance instance");

                    Console.WriteLine("-----------------------------------");

                    Console.WriteLine("ServiceName: {0}, InstanceID: {1}, ServiceStatus: {2}", queryObj["ServiceName"], queryObj["InstanceID"], queryObj["ServiceStatus"]);

                }

            }

            catch (ManagementException e)

            {

                MessageBox.Show("An error occurred while querying for WMI data: " + e.Message);

            }

        }

    }

}

This comes from the WMI code creator, you can download it here. http://www.microsoft.com/downloads/details.aspx?FamilyID=2cc30a64-ea15-4661-8da4-55bbc145c30e&displaylang=en

The above code shows the status of InstanceID as numbers, you can translate them as following. This table comes right from BizTalk documentation.

Description

Value

Ready to run

1

Active

2

Suspended (resumable)

4

Dehydrated

8

Completed with discarded messages

16

Suspended (not resumable)

32

In breakpoint

64

 

Knowing at which shape the running instance is dehydrated

There is a very good article on this , which you can grab it see it here http://blogs.msdn.com/biztalk_core_engine/archive/2007/03/31/hidden-gem-in-biztalk-2006-r2.aspx

In this article Lee tells about a new column added to instances table in the msgbox which shows the shape on where the Orchestration is dehydrated.

The following store procedure when given the InstanceId returns a guid and a XmlDocument. The guid is the shape at which the Orchestration has been dehydrated and XmlDocument contains all the shapes in an Orchestration. You can then make some XPath queries through the XmlDocument and find the guid to know the shape at which the Instance has been dehydrated.

 

GO

/****** Object:  StoredProcedure [dbo].[GetProcessInstanceStatus]    Script Date: 12/20/2007 17:28:48 ******/

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

 

CREATE PROCEDURE [dbo].[GetProcessInstanceStatus]

               @InstanceID uniqueidentifier

AS

BEGIN

SET NOCOUNT ON

SET TRANSACTION ISOLATION LEVEL READ COMMITTED

SET DEADLOCK_PRIORITY LOW

 

SELECT top 1  [BizTalkDTADb].[dbo].[dta_ServiceSymbols].[txtSymbol],[BizTalkMsgBoxDb].[dbo].[Instances].[nvcLastAction]

  FROM [BizTalkMsgBoxDb].[dbo].[Instances],[BizTalkDTADb].[dbo].[dta_ServiceSymbols]

WHERE

[BizTalkDTADb].[dbo].[dta_ServiceSymbols].[uidServiceId] = [BizTalkMsgBoxDb].[dbo].[Instances].[uidServiceId]

AND [BizTalkMsgBoxDb].[dbo].[Instances].[uidInstanceID] = @InstanceID

 

END

 

 

9月27日

Download BizTalk Server 2006 R2

BizTalk Server 2006 R2 "Developer Edition" is now available through MSDN Subscription.
 
 
 
9月14日

BizTalk RFID -- INfinity 510

Yesterday I tried to integrate Infinity 510 with BizTalk RFID Services. And here are the results…

You can definetly see the TAGS, and once you have the TAGS, you can use it any where. For details of BizTalk RFID Services look here.

RFID_Manager

TagViewer  

5月23日

Check these out

It has been long since I got some time to write. Earlier I was busy with some of my Project deliverables and then I was on a short but good and a needed vacation.

With so many things going on it’s really hard to follow all of them especially if you are a Microsoft Technology enthusiast.

BizTalk Services 

Silver light  

Getting started with WPF/E  

Windows live writer  

ESB  

BizTalk Server 2006 R2 Web cast on WCF Adapter  

BizTalk Server 2006 R2 Web cast on LOB adapter SDK

 

PhotoSynth

3月21日

Flat Files Debatching in BizTalk 2006

Flat files are extensively used in BizTalk Projects, In this article I will be talking about some of the scenarios in which Flat files are used

In this example the Flat file which I will be taking is of the following structure:

 

Case 1 : Message only scenario Input Flat File --> OutPut Flat File

 Your Flat file contains a number of records each separated by some delimiter character. For this you can have a schema like the one below, created from the “Flat File Schema Wizard”

 
 

With the “Max Occurrence” properties of Customers Details set to “unbounded

Observation:  

When this type of schema is used in the dissembler part of the Receive Pipeline, the Flat File is not divided into fragments and a single Xml message is created after the message passes through the receive Pipeline.

So after this
    • If you have a PassThroughTransmit sendPipeline, you will see only one Xml file (Not a Flat File) in the send location.

    • If you have a custom send pipeline with a Flat File Assembler and a map applied on it, the transformed message(as a Flat File) is saved in the send location, the Map is applied on the whole message as a whole, taking a lot of memory

Error Handling  

If any of the record is not according to Schema, then the same message is also there in its original format at the send Location. No messages suspended.  

    

Case 2 Message Only Scenario Input Flat File --> Output N Flat or N Xml Files or 1 Flat or 1 Xml File

    In this case the Flat file schema is slightly different and the “CustomersDetails” Record is not set to be “Unbounded”. In this case BizTalk will process the Flat file in a different way.  

    Observation:  

    In this case there will be N messages created (not one as in the Case First).

    N = Number of records in Flat Files

     

     

    So after this

     

      • If you have a PassThroughTransmit sendPipeline, you will see N Xml files (Not n Flat File) in the send location.

        N = Number of records in Flat Files

      • If you have a custom send pipeline with Flat File Assembler and a map applied on it, the transformed messages (as Flat Files) are saved in the send location; the Map is applied on individual record.

      • If you want the Flat files as a whole also in the send Location, just change the “Copy Mode” property to “Append”, this will create a Flat file with all the records. A lot of Disk Access, to write individual record. L

     

    Error Handling

     

    If any of the record is not according to Schema, then nothing happens and the record is appended to the Flat File in the second location. No messages suspended.

    If how ever you look at the xml messages formed after the receive Pipeline, the message is really Scrambled.

     

         For ex.

     

          

    Case 3 Orchestration Scenario Input Flat File --> Single Records to be consumed by Orchestration

    In this case we will see the following features with Flat Files

        •  Message De Batching
        •  Recoverable interchange Processing  

    If we want to use individual records in a Orchestration from a Flat File  

    We have to create a Flat File Schema with its

    Max occurrence set to 1

      

    So if you have N records in a Flat File, then N Orchestrations instances will be created, passing one record to each of the Orchestration instance.  

    Error Handling  

              In this case the benefit is that if any one of the record in the Flat file is not according to the Schema expected, only that message is suspended, and all other messages are received by the Orchestration.  

    Just set the following properties of the Flat file Dissembler  

      

     

    1月20日

    Tools for BizTalk Server

    It’s long time since I last wrote for my space. So I thought just to carry on the tradition, here are some list of BizTalk Tools. You can definitely find these tools on internet.J

    But this will provide a consolidate view of various tools which a BTS developer will love to have.

    Starting with the one of the most complex parts of the BTS, yes you guessed it right…..

    Deployments in BTS

    BDF ( BizTalk Deployment Framework from Scott Colestock)

    BDF is a framework build by Scott Colestock for automating the process of deployment of BizTalk artifacts both on Developer machine and Server Machines.

    It uses NAnt for Deployment Scripts and WiX Tool Set for creating MSI.

    I found it really help full for the deployments for both BTS 2004/2006.

     

     

    Solutions Build Framework (SBF)

    Easy method for scripting automated or ad-hock BizTalk builds and deployments using MSBuild.

     

    Documentor for BTS 

    UK SDC BizTalk 2006 Documentor

    • Provides a nice compiled .chm help file

     

     

    BizTalk Documentor From Eric

    • It produces an html based help.

    • Provides information about maps, Orchestrations, receive locations etc

    • Does not provide the Orchestration viewer.

    • Can be invoked from command line as well as from GUI

     

     

    BizTalkPictureExporter

    Snapshots of BizTalk Orchestration

    A great tool to have for documentation for BTS Applications.

     

    Some other Tools for BTS 

    SchemaDetector from Saravana Kumar

    This toll is used to find schemas with same (TargetNamespace+RootName) in the BTS.

    If a specified schema with RootName and TargetNamespaces matches, it then list the schemas.

     

    BTSHostManager2004

    The tool help to quickly start/stop host instances.

     

    QuickCountersSetup

    QuickCounters.net is a shared source library for managing the rapid creation of custom Windows performance counters for use in performance tests and operational monitoring. Scott Colestock has used these for BTS.

    http://www.codeplex.com/quickcounters/Wiki/View.aspx?title=Getting%20Started

     

     

    Embedded Resource Cache

    Messages from Scratch with Embedded Resources

    Cache the loaded resources in a hash table for performance sake, and allow you to load resources as both strings and XmlDocuments (Used with BDF)

     

     

    Context Adder

    Tool to add some custom properties to the context at any stage of the receive/send pipeline

     

     

    Debug viewer

    Used to see logged information from orchestration using logDotNet, EIF or Enterprise library framework

     

    Microsoft BizTalk Server Best Practices Analyzer.exe

    Good to have a tool for analyzing the deployments.

    It generates a list of issues which according to some are not Best Practices. J

     

    BizUnit from Kevin B Smith

    Testing tool for BizTalk

    Helped a lot to do end to end testing of BizTalk Applications.

    It can also be integrated with BDF from Scott Colestock.

     

    Load Generator from Microsoft

    This tool can be used to test performance of BizTalk application.

    It is used by many IT professionals for doing stress testing of there BizTalk applications.

     

    Pipeline Component Wizard

    Pipeline Component Wizard, can be used to make Pipeline components for any stage of receive or send Pipeline.

     

    BTS 2006 Orchestration Designer for Business Analysts

    It provides Visio Add-ins for BizTalk Orchestrations Designer.

     

    DTC Test Tools

    Tools to test whether the DTC is running or not.

     

    1月4日

    I passed 70-235 (MCTS BTS 2006)

    Yesterday I gave 70-235 i.e. “MCTS: BizTalk Server 2006”. The paper contained 50 questions.

    About 10 question each on BRE and BAM. So BRE and BAM are important parts of the exam.

    Rests of the question were not that difficult; if you have worked on BizTalk 2004/2006 then you can certainly take a chance.

    But now there are lots of questions which are either multiple choice or “Drag and Drop and arrange in sequence” type.

    Great……

    12月14日

    View GAC Folder Structure

    GAC in Microsoft .NET framework is implemented via Fusion.dll, which hides the actual structure of the GAC.

    To view the actual structure of GAC we have two methods

     

    • DOS Command Prompt

    1.      Start à  Runà cmd

    2.      Type cd\. This will bring you to the root directory

    3.      Type cd c:\WINDOWS\assembly\GAC

    4.      Type Dir

    5.      You will see the actual structure of GAC

     

    • Explorer view

    By default the explorer shows all assemblies. But to view the actual folder structure of GAC, we have to do some tweaks in registry.

     

    (Please ensure that you have a backup copy of the registry before starting this.)

     

    On a Windows 2003 OS

    1.      Start à Run à regedit

    2.      This will open Registry

    3.      Follow the structure

    4.      My Computer àHKEY_LOCAL_MACHINEàSOFTWAREàMicrosoftàFusion

    5.      Add new binary value name “DisableCacheViewer

    a.      Select Fusion

    b.      Click EditàNewàBinary Value

    c.      Change the name of the value to “DisableCacheViewer”

    d.      DisableCacheViewer àRight Click-->Modify

    e.      Enter 1 (Any non zero value will also do)

    6.      Open GAC

    a.      StartàRunà Type “c:\WINDOWS\assembly”

    b.      This will open the Explorer but now you will see the actuall structure of the GAC

     

    After making the above modifications to the registry, if you try to open GAC folder, you will now see the actual structure of GAC. For example, if you have deployed two versions of an assembly name Temperature, You can see a folder named Temperature in “C:\WINDOWS\assembly\GAC”

     

     

    If you open Temperature you will see two folders will both of your deployed version assemblies with strong name.

     

     

    These folders will then contain the actual assemblies.

    Deploying Assemblies to GAC

    When we are working with BizTalk artifacts, with each small change in Orchestration etc we have to deploy assemblies to GAC. This can become tedious some times. Here is a handy script which will definitely save time when installing assemblies to GAC.

    Check the following link from BIA group

    http://biztalkia.blogspot.com/2005/12/easier-way-to-add-dll-to-gac.html

    For .Net Framework 1.* as gacutil come with it.

    1.      Copy the following script to notepad and save as *.reg file

    Windows Registry Editor Version 5.00

    [HKEY_CLASSES_ROOT\dllfile\shell\gacutil\command]

    @="c:\\windows\\Microsoft.NET\\Framework\\v1.1.4322\\gacutil.exe /i \"%1\""

    2.      Double click to add the element to registry.

    For .Net Framework  2.0 as gacutil does not comes with it.

    1.      gacutil does not comes with .NET framework 2.0 as it is considered to be developer tool.

    2.      For that if you have VS2005 installed, look for it at the following location

    “C:\Program Files\Microsoft Visual Studio 8\SDK\V2.0\Bin\gacutil.exe”

    3.      For .NET 2.0 use this script file

    Windows Registry Editor Version 5.00

    [HKEY_CLASSES_ROOT\dllfile\shell\gacutil\command]

    @="C:\\Program Files\\Microsoft Visual Studio 8\\SDK\\V2.0\\Bin\\gacutil.exe /i \"%1\""

    After this you can install any strong named assembly to GAC with just a single right Click.

    10月16日

    BTS Pipeline Component Wizard

    To create custom Pipeline Components one has to get into details of various interfaces which he has to implement while creating it. This can get very tedious some times.

    There is a very handy tool for developing Pipeline Components. It hides the complexity from the developer by a simple wizard.

     

    You can get the installer at

    http://www.gotdotnet.com/Workspaces/Workspace.aspx?id=1d4f7d6b-7d27-4f05-a8ee-48cfcd5abf4a

     

    Download it and install.

    This will add a new option in the New BizTalk Projects option "BizTalk Server Pipeline Component Project"

     

    The wizard collects information like

    • ClassName
    • Namespace
    • Type of Component  Send/Receive
    • Place in the Pipeline Encoder/AssemblingSerialezer/Decoder/Validate etc depending on the type of the component(Send/Receive)
    • Component Name
    • Version
    • Description
    • Public property exposed by the component

    After this wizard, a class file is created with a skeleton code ready with all the necessary implementation of needed interfaces.

     

    Also read this article if your project has Custom Pipeline Components.

    http://geekswithblogs.net/sthomas/archive/2006/09/27/92513.aspx

    10月12日

    Viewing Assemblies with the BizTalk Assembly Viewer

     

    This nifty little tool is a Windows Shell extension for examining deployed BizTalk assemblies and assembly types and lets you see references and view the XML code for various types including schemas, maps, orchestrations and pipelines.

     

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/BTS06CoreDocs/html/9831eb88-84bc-4d18-8174-43c3baab83fe.asp

    Documentor for BizTalk

    In every project we need the documentation of the Deployed BizTalk artifacts. I tried two of available BizTalk Documentors:

    1.      BizTalk Documentor from Eric

    http://blogs.msdn.com/ebattalio/archive/2006/03/26/561422.aspx

    2.      UK SDC BizTalk 2006 Documenter

    http://www.gotdotnet.com//codegallery/releases/checkForDownload.aspx?id=0690616f-838c-4583-a4c5-cecc5ac04dac&releaseid=67c9ba64-277a-49e1-897e-2297afad8915

     

    I am presently using the later one.

    10月11日

    BDF BizTalk Deployment Framework

     

     

    I am presently experimenting on BDF, a great thing to have for deployment of BizTalk artifacts both for BTS 2004 and 2006.

     

    But Must to have for deployments of BTS 2004 artifacts.

     

    BTS 2006 comes with a great MSI feature, still we can use BDF from Scott Colestock. See this

    http://blogs.msdn.com/biztalk_server_team_blog/archive/2006/07/11/661812.aspx

     

    Advantages:

    1. Uses NAnt script (XMLJ getting popular day by day)
    2. One has to maintain only one binding file for different environment.
    3. Ease of deployment while moving BizTalk artifacts from one environment to another to another, and so on, because for each environment you have to maintain just one excel sheet with one column each for one environment.
    4. Uses WiX for making MSI
    5. We can add those custom Post/ Pre Deployment/Un Deployment scripts easily in NAnt.
    6. If we haven't changed any of the ports in our orchestration, we can simply replace the orchestration assembly in the GAC and bounce the service.
    7. Provides various other features like:
      1. Scripts to start/stop various hosts
      2. Create various Virtual dirs
      3. Creating App pools
      4. App pools settings
      5. IIS Reset
      6. Deploying BizTalk rule engine vocabularies and rules
      7. We can specify send port groups, send ports, and receive locations that should NOT be started when ports are started
      8. We can also specify Orchestrations that should not be started or stopped
      9. We can also specify the dependencies for deploying and undeploying, which in turn decides the over all order of deployment.
      10.   Import Port Bindings File etc

    To see details see the following links, Scott has some good documentation for BDF.

     

    http://www.traceofthought.net/PermaLink,guid,687edf39-57aa-4776-9aea-8c0f769320c1.aspx

     

    http://nodtonothing.blogspot.com/2005/11/i-geek-therefore-i-am-biztalk.html

     

    BDF can be divided into two parts:

    1. Creation of MSI
    2. Deployment

     

     

     

    Creation of MSI

    For this BDF comes with WiX, Candle, light and some other handy tools, which helps creation of MSI files.

    BDF provides “GenericBizTalkMSI.wxs”, generic wxs file for creation of MSI.

    This .wxs file is used by two NAnt files

    ·         [ProjectName].WiXSetup.build

    ·         [ProjectName].WiXSetup.nant [Core MSI Script file]

    We can also modify these custom NAnt scripts.

    The process of creating a MSI is:

    1. The scripts first create a redist folder, which actually contains all the artifacts which will be dumped to deployment server.
    2. The script then calls candle. Candle is responsible for preprocessing the input .wxs files into valid well-formed XML documents against the WiX schema, wix.xsd. Then, each post-processed source file is compiled into a .wixobj file.
    3. Then light is responsible for processing one or more .wixobj files, retrieving metadata from various external files and creating a Windows Installer database (MSI or MSM).      

     

    http://wix.sourceforge.net/manual-wix2/wix_index.htm

     

    Deployment

     

    The process of deployment can be divided in two parts:

    • Deployment on Developer Machine
    • Deployment on Server Machine

     

    Developer Machine

     

    BDF comes with a script which adds the following options in VS environment.

    ·         Deploy BizTalk Solution

    ·         UnDeploy BizTalk Solution

    ·         Update Orchestrations

    ·         Bounce BizTalk

    ·         Gac It

    ·         HAT

     

    So over all above processes reduces a number of steps which a developer has to do manually. Over all the efficiency of a developer is increased.

     

    Server Machine

     

        The deployment of the MSI to the production server is a two phase deployment. In the first phase, all the BizTalk artifacts are copied on to the server, but not deployed. In the second phase the user can deploy using the option in the start->Programs Files-> Project Name-> Deploy Project, which actually deploys the solution to BizTalk.

     

    Deployments on a server can often require additional information beyond what is provided in the NAnt script.  This information can be divided into three broad categories:

    1)     Information that has to be gathered from the person doing the installation (i.e. account names, passwords, etc.)  We call this “Install-time configuration.” This is gathered through “InstallWizard.xml

    2)     Information that is specific to the environment you are installing in (i.e. development, QA, integration/staging, or production.)  We call this “Environment-relative configuration.” Information Stored in “EnvironmentSettings.xls” and then exported to xml files, one for each environment. User can select one of which while deploying the solution.

    3)     The port setting which we can gather through the Binding files. For this we need a Port Binding File

     

    All these features are available in BDF.

     

    Any way all these above feature makes it a very good framework to use. So go ahead and just try it.

     

    Because of hands on NAnt script (used in BDF), presently working on build scripts L. But Struggling with CC tasks in NAnt. Any help will be appreciated

     

    6月22日

    Integration Patterns

    Integration Patterns explains how patterns were used to design and build an integration architecture within a representative customer scenario. The guide includes a catalog of 18 common integration patterns including implementations that use the Microsoft platform