Sunday, June 24, 2012

BTDF–Use a different binding for Test as Dev


The BizTalk Deployment Framework utilizes MSBuild and is therefore highly flexible. In case you wan’t to use FILE ports in DEV and an entirely different protocol in TEST you have 2 options:

1) Use Macros and leverage the XmlPreprocess and Masterbindings functionality

2) Override the Portbindings/PortbindingsMaster MSBuild property.

I will show you how to realize option #2

Configure the binding file in the BTDF Settings file


Configure the BTDF Project


       <PropertyGroup Condition="'$(Configuration)' == 'Debug'">










Friday, June 22, 2012

BizTalk still being updated…CU5 released

Ok, so no major updates but still some fixes that seem very critical, now bundled in a cumulative update (CU5)

Among other fixes;

2703644 FIX: Orphaned rows are created when you run the "DTA Archive and Purge SQL Server Agent" job in BizTalk Server 2010 BizTalk Server Business Activity Monitoring (BAM) Runtime

2676141 FIX: An instances table is changed to use the primary filegroup in the BAMArchive database when you run the BAM SSIS package in BizTalk Server 2010

During installation


Restart of services


Note: Make sure that the virus scanner (e.g. TrendMicro) can be stopped or is stopped as this will prevent the WMI service from stopping and prevent you from installing the update (changes can not be rolled back).

Even a free summary screen with log is included Glimlach



If you’re really interested in the all the windows that pop-up, I suggest to open the log file as well.


Best regards,



Thursday, June 21, 2012

ESB Toolkit – Unit testing BRI lookups

One of the major advantages of the ESB Toolkit is that you can leverage the highly flexible Business Rule Engine (BRE) and use the BRE to dynamically configure various ESB related functionality:
- Itinerary to be started
- Transformation Type (thus, the name of the map)
- Endpoint (Set End Point Outbound Transport Location, e.g. Transport Type, Location, Action etc.)
This wonderful stuff can be done by doing BRI Lookups in the pipeline (executed in the ESB Pipelines using the ESB Dispatcher pipeline component) or even from within an itinerary (this applies for Transformation Type and Endpoint information off course)
One of the difficulties of this is that testing this is fairly cumbersome since tooling wasn’t readily available to do some automated testing….now there is!
Tool for testing BRI calls
My colleague IT Hero - Tomasso Groenendijk has created a very useful tool to do manual testing on BRI lookups. This enables you to quickly test rules and determine if the ESB information is correctly set. This is possible using a practical interface and comes even with documentation containing screenshots (yes that’s right….a tool, with code….and DOCUMENTATION!)
Automated unit testing BRI calls
As I was working on a quite large Rule set, I used the tool and thought it would be useful to create my unit tests with the tool by creating some helper classes…this made it extremely easy to do automated testing.
As the code is fairly simple I will point out the functionality of the tool and show screenshots of the unit testing features you could use it for:
Unit Test

private static void ValidateItineraryName(string pathToInputFile, string customer, string expectedItineraryName)
FileParameterReplacerStep fprs = new FileParameterReplacerStep();
fprs.AddPair("CUSTOMER", customer);
fprs.FileName = pathToInputFile;

ESBRuleTester esbTest = new ESBRuleTester();
RuleContainer rc = new RuleContainer();
rc.FactType = RuleContainer.FactsEnum.Itinerary;
rc.PolicyName = "Policy.ESBResubmit.ItinerarySelect";

ItineraryContainer ic = esbTest.RetrieveItineraryContainer(pathToInputFile, rc);

Assert.AreEqual(ic.Name, expectedItineraryName, true, "The Itineraryname is not as expected");

Well, I’m sorry for not posting the code, although I hope this gives some ideas how to use the Tool and how to implement unit testing. In my case it was fairly easy to test about 25 itineraries automatically and isolated which had to be done otherwise by creating a lot of BizUnit steps that supplied messages on ports that were configured using test-bindings to simulate calls, and derive by verifying the output files that the correct itinerary was started.

Method: GetPathToDataFile(“”) this is implemented in a base TestClass and retrieves the path of the Unit test datafiles by determine the Assembly directory of the ‘TestResultsfolder’. I do this to make it easy to work with files
Class: ESBRuletester contains the functionality provided by the Tool, this created to enable testing from code instead of using a GUI
Class: RuleContainer, this is a simple class that contains usefull parameters
Class: ItineraryContainer (this is a simple data class that contains the results of the ItineraryFact, same structure is developed for testing EndPoint / Transform, this makes it easier to implement BizUnit validation steps.

Well, hopefully this helps in developing automated testing when developing functionality for the business rules engine and the ESB Toolkit.


Monday, June 18, 2012

Centralized SSO Application Configuration Data Store

Reading application configuration data from a Single Sign-On database is a well-known concept within the BizTalk community. There are other means of retrieving application configuration data for BizTalk, yet retrieving them from SSO is the most powerful one. Microsoft has built an SSO Application Configuration Snap-In that provides a good user experience maintaining custom configuration data. With the Snap-In you will also get code for a .NET Helper Class to support retrieval of application configuration data in BizTalk. This approach has some major benefits. Your application configuration data is cached, has a built in refresh mechanism (ESSO Service) and is secure.
What if you have a requirement that to remotely (from a non-BizTalk machine) retrieve application configuration data, because you like to benefit from SSO Config Store?
Consider the following diagram
In this scenario a mapping is implemented using a Functoid based on a shared helper class that reads the connectionstring information from SSO. Why all this trouble, well….BizTalk is not the only product that can do transformations, -and it’s worthy to write another post on when to use what product- but let’s say that this helper class is designed with in mind that the functionality will re-used by other interfaces which are developed using Sql Server Integration Services (SSIS) interfacing.
The implementation forces us to enable the machine that runs SSIS to access the SSO Database, that is, using the SSO API.
Business scenario
We use the BizTalk Deployment Framework (BTDF) to create an SSO Application, the BTDF uses the BizTalk Configuration to determine the location of the SSO. This works fairly easy since the Enterprise Single Sign On service is available on the BizTalk machine and all the required components.
However an SSIS machine….has no BizTalk, no Enterprise Single Sign on Service, no SSO Client…
Why is the SSIS arrow in red….well…getting this scenario to work is not what you call ‘a walk in the park’.
Steps to implement this scenario, what can go wrong
· Installing the SSOClient (I used the setup from BizTalk and only installed the administration components)
o Configure the SSO Server
Note: SSO Affiliate Applications are visible
· SSOAdministration MMC Snap-in
o Verified that the server is available
· Program Files\Common Files\Enterprise Single Sign On
o Verified using ssomanage –listapps that REMOTE applications are visible/shown
· DTC Ping
Performed a ping on the client/server
· Create a test client with different SSO Interop dlls
o Unhandled Exception:
System.Runtime.InteropServices.COMException: Could not contact the SSO server '<Server>'. Check that SSO is configured and that the SSO  service is running on that server.

(RPC: 0x800706D9: There are no more endpoints available from the endpoint mapper.)
at Microsoft.BizTalk.SSOClient.Interop.ISSOConfigStore.GetConfigInfo(String applicationName, String identifier, Int32 flags, IPropertyBag properties)
at SSOSettingsFileManager.SSOSettingsFileReader.Read(String affiliateApplication)
at SSOSettingsFileManager.SSOSettingsFileReader.ReadString(String affiliateApplication, String valueName
at SSOSettingsFileReader.ReadString(String affiliateApplication, String valueName) at CheckSSOSetting.Program.Main(String[] args)

How to solve this
To implement this scenario you would have to create a custom SSO client (or make some minor modifications).
· In our case the BTDF created the SSO Application using a specific GUID, ensure that when you read settings from an SSO Application, that the same GUID is used for reading settings

public static string InfoIdentifier = "{56D74464-67EA-464d-A9D4-3EBBA4090010}";
· Use the correct SSO Flag
//SSOFlag.SSO_FLAG_RUNTIME does not work from a remote machine
private const int SSOFLagsToUse = SSOFlag.SSO_FLAG_NONE; 

The SSO Client code
To be able to communicate with the SSO Server from a non-BizTalk machine the client code that works for SSO Application created with the BTDF is listed below;

public static string InfoIdentifier = "{56D74464-67EA-464d-A9D4-3EBBA4090010}";

//SSOFlag.SSO_FLAG_RUNTIME does not work from a remote machine
private const int SSOFLagsToUse = SSOFlag.SSO_FLAG_NONE; 
ISSOConfigStore configStore = (ISSOConfigStore)new SSOConfigStore();
SSOPropertyBag bag = new SSOPropertyBag();
configStore.GetConfigInfo(affiliateApplication, SSOHelper.InfoIdentifier, SSOFLagsToUse, bag); 
bag.Read(SSOHelper.PropName, out propertyValue, 0);
public void SaveConfigInfo(SSOPropertyBag bag, string affiliateApplication)
ISSOConfigStore configStore = (ISSOConfigStore)new SSOConfigStore();
configStore.SetConfigInfo(affiliateApplication, SSOHelper.InfoIdentifier, bag);
public void DeleteConfigInfo(string affiliateApplication)
ISSOConfigStore configStore = (ISSOConfigStore)new SSOConfigStore();
configStore.DeleteConfigInfo(affiliateApplication, SSOHelper.InfoIdentifier);

And voila…

Thanks to my colleagues from Microsoft Nico Stokman and Dick Dijkstra for their never ending enthusiasm to solve a problem where you didn’t wish you would have to go the extra mile to resolve it and Steef-Jan for his input and suggestions on this blog subject.


Friday, June 08, 2012

WCF-Oracle–Install the 32- and 64-bit client (the following assemblies are installed SDK assemblies…)


There are probably already lot of posts on the installation of the Oracle client, so this is a small note;


If you start visual studio on a machine that hasn’t got the Oracle 32-bit client installed, prepare to face the following error;

‘The following assemblies are installed SDK assemblies but could not be shown in the customize toolkit dialog because they…..’



This is because VS.Net is 32 bit and you only installed the 64-bit Oracle client.

Install for your DEVELOPMENT environment both the 32-bit and 64-bit client.




Friday, June 01, 2012

BizTalk Pub/sub vs Topics based routing–discussion

My colleagues and I had a brief discussion about the subject ‘Topics’ and what it brings…
Do you all agree/disagree with the following statement: topic-based pub-sub messaging doesn’t really exist in BizTalk
“In my opinion; I disagree, as BizTalk offers the following 'out-of-the-box' • Message Routing (f.e build in context properties like message type, trading partner, operation etc)
• Content Routing (f.e. promoted properties, message inspection in orchestrations/pipelines icw orchestration logic)” My colleague Rene Brauwers

Here my 2 cents….
I agree that it exists...however the current offerings in BizTalk are tightly coupled, making the usage far from perfect.
When doing content based routing on custom fields (promoted properties), you will be making the solution message-coupled; Your custom message property schema is deployed, and the message filter on these fields have a direct relationship with this property schema. Making any change to this schema will give you a head-ache and effectively means that your solution is tightly coupled (only loosely coupled when using BTS properties) When doing pipeline-development your solution will also become coupled as the pipelines are tied to your solution. Again, not a very manageable situation (when thinking in terms of reusability / manageability). Summary To my humble opinion pub-sub means that the subscriber can route messages based on a subscription without creating a dependency on the publisher. In BizTalk this is not the case, so i would say: we need Topics and Queues as AppFabric is going to provide!!!   Regards, Sander