Category Archives: Uncategorized

I finally learned that Virtual PC on an external HD is an excellent way to do development and general learning.  So I have a baseline BizTalk 2006 r2 and now need a baseline BizTalk 2009.

So 1st step was to install Windows Server 2008 (enterprise Ed).  After several attempts where the installation failed right after entering the Product Key, did not enter the Product Key.  Then and only then did the installation continue and Windows Server 2008 got installed …  all this on the Virtual PC, mind you.

I then did the initial configuration (Computer Information and Security Information – I’m leaving Roles Summary ’til later, when I can figure out what that means).  But without the Product Key, I have essentially an evaluation copy installed.  Need to get the Product Key entered.

How this is done is to open the Control Panel, then open System.  At the bottom the last section is “Windows Activation”.  There is a product id field… and to the right of that is a link, “Change product key”.  Click on this and enter the product key.  Click on the button to accept this key and it will take a few minutes while the system thinks about it.

Now to find out about roles and about the next step in getting BizTalk on board.

————-
This installation was actually a bust.  Turned out the iso image I had was for Longhorn and Longhorn Core… neither of these will work well.  Got seriously stuck on trying to install VStudio 08 – never could get it to install.

Finally got ahold of the right iso for WinSvr08 and the install went find.

[Whoa! Just noticed the date. Six years ago, I was on the Colorado River in the Grand Canyon. We had a small memorial service for the victims of a year earlier]

How do you create a canonical schema? The first part below is how to do this, followed in a later post with why a canonical is used.

Creating the Canonical–
A canonical schema is actually several schemas that are imported into a ‘master’ schema. This example is for a Real Estate Management Company, which manages several varieties of real estate – single family & duplexes, multifamily apartments, office buildings and warehouse facilities. If you try to construct a single schema that will handle each of these situations, the schema will be unwieldy and cumbersome to maintain. Instead we will create a separate schema for each. A schema for the single family and duplexes; a schema for the office buildings; and a schema for the warehouses. This will make it much easier to design and maintain the schemas to be specific to the purpose and to modify when situations arise to do so.

First, create a schema for each of our situations.


But create them in a folder within the project.

Next, create the master schema that is to hold the other schemas. It is not in that folder. Then add a child record to the root node for each schema as created in the first step.

Then go to the properties for the schema node in the master schema and click the ellipsis at the Imports property in the Advanced Group.


This brings up the Imports Dialog. Click on the Add Button, which brings up the BizTalk Type Picker that will list the schemas you’ve created.

From this type picker select the schemas that are to be folded into the master schema (allowed one at a time).


Once all have been selected and imported the Imports Dialog will look something like this.

Click the edit button (“abl”) to change the prefix like has been done at ‘whse’ in the example.

Now highlight each of the blank records that you added to your master schema and click on the dropdown for the Data Structure Type property. The reference schemas are displayed.

For that ‘Record’ make its Data Structure Type one of these schemas.  If you have everything right, your new canonical schema will look something like this.

I do hope that this helps in creating a canonical schema.  Next post will be about why you would wish to use a canonical.

You are creating you map in BizTalk.  What if you have an incoming element that you need to handle based on the data content?  Like if it’s a null do one thing and if its a value do another.

There is a quick one line piece of C# code that you can put in your functoid to handle:

     (conditional statement)? [case, if false]:[case, if true]

For example:

     newVar = (varValue == null) ? “” : varValue;

This will return an empty string if the value is null; otherwise the incoming value is used.

In a scripting functoid using “return (varVal == null)? “”: varVal;” works just as well.

I was using the TCP adapter to allow the mainframe folks to query SAP for pricing info and get a response back.  But there was a problem – somewhere.  The TCP connection?  The message?  I was having a dickens of a time finding out where the error really was.

Then there was the orchestration where there was that red bang (!) that indicated an error.  However, the expression did not have any error, plus the orchestration built and deployed okay.  Of course, the application would fail – somewhere!.  Tracked the error down to something to do with the response message to the TCP adapter.

Very frustrating and another BT developer kept telling me that the red bang was meaningless, because BT was ‘flakey’.  Besides, when I used the TCP Adapter test harness the message would go through without an error!  So, that would tell you that it wasn’t BizTalk, but something with the TCP connection, right?

 But that red bang in the Message Assignment shape just annoyed me to no end, even though there wasn’t any error in the expression.  Finally, and I don’t know exactly what I did, I changed some parameter in the expression and it was underlined and was in error (for finally the 1st time!).  Reading the foot of the dialog, it read that a reference to the Microsoft.BizTalk.Pipline.dll was missing.  What?  That was there (I thought) – quickly checked references and found I had the other references but not that particular one.  Added it in and no more red bang, plus the orchestration now worked.

Why this error didn’t manifest itself to start with – I just don’t know, but sure wasted a lot of time trying to track down where I’d gone wrong with the message, or the pipeline or the flat-file or the TCP connection or the orchestration, etc., etc.