Tallan's Technology Blog

Tallan's Top Technologists Share Their Thoughts on Today's Technology Challenges

Add to the Global Assembly Cache on MSI Imports

Dmitriy Gitelman

If you want all resources of your BizTalk application to be registered in GAC on MSI import, it is necessary, prior to exporting BizTalk application to MSI file, to check ‘Add to the global assembly cache on MSI imports (gacutil)’ option in Modify Resources dialog box. This option is unchecked by default. To avoid the need of doing it for each resource separately, do the following:

Open dbo.bts_application table in BizTalkMgmtDb database

Find application name in nvcName column and write down the Application ID (nID column)

Run this update statement in BizTalkMgmtDb database (replace <app_id> with Application ID retrieved in #2):

update dbo.adpl_sat set properties = replace(cast(properties as nvarchar(4000)),
‘UpdateGacOnImport</key><value>False’, ‘UpdateGacOnImport</key><value>True’) where applicationId = <app_id>

Testing BizTalk Applications

Lee Rodgers

Found a great resource today for how to go about testing BizTalk applications.  It covers best practices on how to unit test various BizTalk artifacts such as schemas, maps, pipelines, orchestrations.  This covers how these should be covered with tests for integration testing as well as functional testing.  Very interesting read.
http://geekswithblogs.net/michaelstephenson/archive/2008/04/27/121687.aspx

How to Easily Document BizTalk Applications

Lee Rodgers

One of the tasks developers find most tedious is documentation.  It gets to the point that documentation never gets done in many cases.  This is where documentation tools comes in handy.  There is a documentation tool that is available that analyzes the BizTalk application and creates a CHM file containing:

Send & Receive Ports
Schemas & Maps
Pipelines
Orchestrations
Business Rules
And More

The tool is an open source project that can be found on CodePlex:
http://www.codeplex.com/BizTalkDocumenter

Debug BizTalk Orchestration in Production Server

Leo Wang

Murphy’s Law: if anything can go wrong, it will. If BizTalk orchestration instance in a production server does not behavior as you expect it, how do you diagnose the problem? Remember, attaching debugger to an orchestration instance is usually impossible in this case.
DebugView is one of my favorite tools for troubleshooting issues in production environment. For many years, I have used it to debug Visual C++, Visual Basic, C#, ASP and ASP.Net web applications. No exceptions, I use it for BizTalk orchestration debug too. The System.Diagnostics.Trace.WriteLine method can be used to output string. Under the hood, it will call Win 32 OutputDebugString method. If DebugView is not enabled, there is no performance penalty. However, this method will hurt performance if you launch DebugView. In case you don’t have this tool, you can download free one here.
Alternatively, the System.Diagnostics.EventLog.WriteEntry method is…

EclEmma – Unit Test Coverage Analysis in Eclipse

I was recently looking for a unit test coverage analyzer such as JCoverage for a project I’m working on. After reviewing several tools I discovered an amazing free tool called EclEmma.
I’ve used JCoverage in the past and while it’s HTML based reports are useful for project managers they are less so for developers. This tool essentially gives you the same information, but directly in Eclipse. You simply run the analyzer on either a single class or a set of classes and viola… you have your coverage report.
It even color codes each line of code within your editor window.

Use the http://update.eclemma.org/ update site to install EclEmma.

Unit Testing BizTalk Applications

Lee Rodgers

Unit testing is a best practice when it comes to application development.  BizTalk development falls into this realm of application development so it would be great to be able to unit test these applications as well.
The most commonly used unit testing tool with BizTalk is BizUnit (http://www.codeplex.com/bizunit).   This is a step based test framework where steps are defined in XML.  Using BizUnit in conjunction with either Visual Studio .Net Tests or nUnit tests would allow for unit tests to be integrated as part of a build process.
More information and examples will be posted in the coming weeks so stay tuned.

Deploy BizTalk policy using command line tool

Leo Wang

As I discussed in my previous blog, manually deploying BizTalk application is error-prone. For every BizTalk application, developing a script to automate deployment process is absolutely necessary. One of recent projects I’m working on requires to import and deploy policies with multiple rulesets and vocabularies. BTSTask , a command line tool from Microsoft, can be used to accomplish this task.
For example
BTSTask ImportApp /Package: “C:\MSIFiles\MyApplication.msi” /Environment: Test /ApplicationName:MyApplication /Overwrite
For detail steps about how to use BTSTask to import policy, click here.
Although BTSTask works, it demands policies are stored in an MSI file. This is not desirable because it’s not easy to compare different versions in binary format. Ideally, I would like to import an XML file. Luckily Microsoft provides a sample console application, which almost can fulfill my requirement. You can download the tool ( ImportExportRuleStore.exe ). Please note, you…

Shortcuts and Tips

Shawn

As with any application, keyboard shortcuts can save a developer a tremendous amount of time. I have found that keyboard shortcuts are absolutely necessary for creating BizTalk schemas with more than a few nodes. An advanced schema can take many times longer if you have to continually insert each node one at a time. Shortcuts and the AutoLink feature of the BizTalk Mapper can also save a developer a great deal of time. Although the information below can also be found on the MSDN site, I thought it might be helpful to get it all in one area.
BizTalk Editor Keyboard Shortcuts

Action
Keyboard shortcut
Alternate Shortcut

Opens the BizTalk menu.
ALT+Z

BizTalk – Insert Schema Node – Child RecordAdds a Record node at the end of the child nodes of the currently selected node.
ALT+Z, I, R
CTRL+I, CTRL+R

BizTalk – Insert Schema Node – Child Field…

Dynamically Reading Receive Location Context Properties

roliva

A situation present itself occur where an orchestration uses a receive port that is sourced by multiple receive locations to receive a message and a specific context property must be read from the incoming message. Because the message is coming from different receive locations, an evaluation of the to location may be necessary to determine the proper context property. For example, the following receive port is set up to accept an incoming message from four different receive locations:

In this example, the file is not only coming in from four receive locations, but each location is a different type (a windows folder, a SharePoint document folder, an FTP site or email). To get a file property such as the file name, an orchestration will need to read the context property ReceivedFileName associated with the specific receive location. When multiple locations are…

Common BizTalk Deployment Issues & Solutions

Leo Wang

Deploying BizTalk application is a challenging task, which requires some special knowledge beyond desktop or web application deployment. In this blog, I will discuss some very common deployment issues and their solutions.
I usually choose manually deploy BizTalk application to other computers due to the time constraint to write automation script. A typical deployment cycle consists of three steps. First, prepare BizTalk application for deployment. I usually deploy BizTalk application to my local BizTalk server, then test it to ensure it works properly. I will check the value of Application Name of the project property pages to ensure it is specified properly. If the application name is not defined, it will be deployed to the default BizTalk application, BizTalk Application 1. Once it’s up and running, I will add some resource files to the application such as binding file for a…

\\\