ESB Links

http://www.infoq.com/news/2009/02/ESBVendors
An ESB Vendors Evaluation by Forrester Research


ESB vs Biztalk Debate Gets Heated in Barcelona
– While giving a presentation at the Enterprise Architect Summit in Barcelona, on It turned into a pretty heated debate over core architectural fundamentals, which we hammered out in front of an audience of about 75 unsuspecting conference-goers….

More coming as we find them…

DECLARE @Jobname Varchar(50)
DECLARE @Jobid binary(16)

Set @Jobname = N’ESB_LaSalle-Loan-Removal-Monthly’
SELECT @Jobid = job_id FROM msdb.dbo.sysjobs WHERE (name = @Jobname)
select ‘job1’, @jobid, @jobname
IF (@jobId IS NOT NULL)
exec sp_delete_job @job_name=@Jobname;

“Cannot add, update, or delete a job (or its steps or schedules) that originated from an MSX server.” +”originating_server_id”

I got this error when doing the following. I did right-click ‘Create Job as” then “Create to” a new query window. I was scripting 3 SQL agent jobs, then tried to combine them into one script.

I was trying to build my script without any “GO” commands, so I could have some variables at the top used throughout as parameters.

It was critical to reset these variables before each call to sp_add_job:
SET @ReturnCode = null
SET @jobID = null

The other “hits” I found when googling were totally off target of my solution above. I’m using SQL 2005, which seems to have an “originating_server_id” instead of an “originating_server” in the sysjobs table.

Hope this helps someone!

Neal

OSLO links

Bill Gates – Future of Software Development – Oslo – WMV Video

BizTalkGurus.com – Sample videos of Quadrant, Intelipad, and “M”

Information Week article – Oct 10, 2008

OS News – Oct 28, 2008

Oslo’s Modeling Language Promises (CIO Oct 28, 2008)

ZDNet – More Microsoft ?Oslo? modeling details fall into place

MSDN – The “Oslo” Modeling Platform

James Clark’s Random Thoughts

SDTimes – Microsoft details Oslo’s modeling language, tools

Screencast: Microsoft BizTalk Server 2006

BizTalk on the VMWare Lab Manager Environment
A Video should appear below:


Download or read more information on CodePlex: http://www.vmware.com/products/labmanager/

Schema Reuse

In the Complex XPath example I just posted, I built a Books schema, which includes a “record” which then points to a second schema called “Book”.

We do this all the time at my various clients.

I decided to take some quick screen shots and show how it works here:

First, build the schema to be included (book.xsd):

Then, build the schema that uses it (books.xsd):

After adding the “Books” element to the “Books.xsd” schema, I clicked the word <Schema> above the root element. From there, I went to the properties window, and clicked the … on Imports. Then leaving the “Import New Schema as” value to the default of “XSD Import”, I cliked the “Add” button, and picked the “book.xsd” schema from the selection list. After that, I overtyped the default prefix value of “ns0” to “bk”.

When this schema was built, I added a “child record” under books. Then, click the properties for that “record” and changed the “Data Structure:

To see the resulting XML and a lesson on Complex XPath,
see this page on Complex XPath.

Complex XPath

Complex XPath with BizTalk Schema/Data

http://www.w3schools.com/Xpath/xpath_examples.asp does a pretty good job of showing elementary XPath.
But in the “Real World” with BizTalk, Xpath can be more challenging.
This is a follow-up to my January 3, 2005 blog entitled “Common XPATH Examples, Questions, Issues with Biztalk”
http://nealwalters.blogspot.com/2005/01/common-xpath-examples-questions-issues.html

When BizTalk creates a sample instance, it creates it in this structure (except below, more realistic data has been entered).

<books>
   <book>
     <title>A Tale of Two Cities</title>
     <authorLastname>Dickens</authorLastname>
     <authorFirstname>Charles</authorFirstname>
     <category>fiction</category>
   </book>
   <book>
     <title>Operating Manual for Spaceship Earth</title>
     <authorLastname>Fuller</authorLastname>
     <authorFirstname>Buckminster</authorFirstname>
     <category>science</category>
   </book>
   <book>
     <title>The Singularity Is Near: When Humans Transcend Biology</title>
     <authorLastname>Kurzweil </authorLastname>
     <authorFirstname>Ray</authorFirstname>
     <category>science</category>
   </book>
   <book>
     <title>The Age of Spiritual Machines: When Computers Exceed Human Intelligence</title>
     <authorLastname>Kurzweil </authorLastname>
     <authorFirstname>Ray</authorFirstname>
     <category>science</category>
   </book>
</books>

/books/book/title – returns all titles

/books/book/category[.=’science’] – returns all categories, where the text of that category = ‘science’

/books/book[category=’science’]/title – returns all titles, where the text of that category = ‘science’

/books/book[category=’science’ and authorFirstname=’Ray’]/title – return all titles where Ray is the author and category = ‘science’

When BizTalk creates a sample instance, it creates it in this structure (except below, more realistic data has been entered).
Each “book” record has it’ s own name space. This data was created with a ‘books’ schema, which in turn imported a “book” schema.
The book record was defined by adding a new “record”, and settings its property “Data Structure (Type):

<ns0:books xmlns:ns0=”http://biztalk-training.com/books”>
   <ns1:book xmlns:ns1=”http://biztalk-training.com/book”>
     <title>A Tale of Two Cities</title>
     <authorLastname>Dickens</authorLastname>
     <authorFirstname>Charles</authorFirstname>
     <category>fiction</category>
   </ns1:book>
   <ns1:book xmlns:ns1=”http://biztalk-training.com/book”>
     <title>Operating Manual for Spaceship Earth</title>
     <authorLastname>Fuller</authorLastname>
     <authorFirstname>Buckminster</authorFirstname>
     <category>science</category>
   </ns1:book>
   <ns1:book xmlns:ns1=”http://biztalk-training.com/book”>
     <title>The Singularity Is Near: When Humans Transcend Biology</title>
     <authorLastname>Kurzweil</authorLastname>
     <authorFirstname>Ray</authorFirstname>
     <category>science</category>
   </ns1:book>
   <ns1:book xmlns:ns1=”http://biztalk-training.com/book”>
     <title>The Age of Spiritual Machines: When Computers Exceed Human Intelligence</title>
     <authorLastname>Kurzweil</authorLastname>
     <authorFirstname>Ray</authorFirstname>
     <category>science</category>
   </ns1:book>
</ns0:books>

When BizTalk creates a file from the mapping utility, it combines the namespaces onto the root element, and uses a different prefix, as shown below:

<ns0:books xmlns:ns0=”http://biztalk-training.com/books” xmlns:bk=”http://biztalk-training.com/book”>
   <bk:book>
     <title>A Tale of Two Cities</title>
     <authorLastname>Dickens</authorLastname>
     <authorFirstname>Charles</authorFirstname>
     <category>fiction</category>
   </bk:book>
   <bk:book>
     <title>Operating Manual for Spaceship Earth</title>
     <authorLastname>Fuller</authorLastname>
     <authorFirstname>Buckminster</authorFirstname>
     <category>science</category>
   </bk:book>
   <bk:book>
     <title>The Singularity Is Near: When Humans Transcend Biology</title>
     <authorLastname>Kurzweil</authorLastname>
     <authorFirstname>Ray</authorFirstname>
     <category>science</category>
   </bk:book>
   <bk:book>
     <title>The Age of Spiritual Machines: When Computers Exceed Human Intelligence</title>
     <authorLastname>Kurzweil</authorLastname>
     <authorFirstname>Ray</authorFirstname>
     <category>science</category>
   </bk:book>
</ns0:books>

/*[local-name()=’books’ and namespace-uri()=’http://biztalk-training.com/books’]/*[local-name()=’book’ and namespace-uri()=’http://biztalk-training.com/book’]/title

/*[local-name()=’books’]/*[local-name()=’book’]/title

/*[local-name()=’books’]/*[local-name()=’book’][category[.=’science’]]/title

If for some reason, you had a namespace on category, the same query could be done like this:
/*[local-name()=’books’]/*[local-name()=’book’][*[local-name()=’category’][.=’science’]]/title

/*[local-name()=’books’]/*[local-name()=’book’][category=’science’ and authorFirstname=’Ray’]/title

Thanks to the support team at “StylusStudio.com” for helping with these concepts in their forums. Click here for –>
My discussion thread on these issues
The trick they revealed is that the [] expressions can be nested. Here’s another post, where we talked about selecting a higher node:
link.

That’s the end of the XPath lesson, if you want to see how the “Books” schema was created, see here… BizTalk Schema Imports.

It’s an attribute (decorating), not a preprocessor directive, that allows you to skip a well-tested method when you are using F11 to step-through your code.

THE PROBLEM
When using F11 to step through your code in debug mode, you often go into helper routines that are well-tested and won’t have errors. Wouldn’t it be nice to skip over these? Wouldn’t that speed up your debugging – or at least make it less boring?

THE SOLUTION:
Add the “DebuggerStepThroughAttribute” before the method you want to skip.

Below is a simple routine I often use that adds a Slash to a path name, but only when it doesn’t end with a slash. It works, so I never need to walk-into it. (I guess I could also put it in a common library.)

        [DebuggerStepThroughAttribute()]
        public static string EndsWithOneSlash(string pathname)
        {

            // make sure we have one slash at the end of a path
            if (!pathname.EndsWith(@""))
                pathname = pathname + @"";
            return pathname;
        }

I’m receiving a csv flat-file. It’s debatching in the pipeline, causing one orchestration to start for each row.

Sometimes I desire such behavior, but in this case I don’t.

I can’t figure out what is making it debatch. The pipeline refers to two schemas, the header and document schema.

Neither one has “Envelope=true” and thus neither had the “Body XPath” parameter set.

Any ideas what else makes it debatch?


The Flat-file disassembler does not use the Envelope semantic to debatch a message.
It uses the structure of the schemas.

If a schema has this structure

<row><field/><field/><field/></row>

Then the Flatfile disassembler will debatch by row.

To receive the entire message change the schema to

<message><row maxOccurs=”unbounded”><field/><field/><field/></row></message>

Thanks to Greg Forsythe in the BizTalkGurus.com forum.