What the BizTalk Server 2013 Mapper Updates Mean for You

This blog post represents the first in a weekly series that will highlight things you need to know about new features in BizTalk Server 2013. This week we will look at the new mapping engine and how the underlying changes in the engine might effect the behavior you see when using the BizTalk Mapper.

If you look at the list linked above, you find this:

The Mapper uses the XSLCompiledTransform class. Previous BizTalk Server versions used the XslTransform class, which is obsolete. The XSLCompiledTransform class provides performance enhancements, including:

  • Once the Load method completes successfully, the Transform method can be called simultaneously from multiple threads.
  • The new XSLT processor compiles the XSLT style sheet to a common intermediate format. Once the style sheet is compiled, it can be cached and reused.

For more information on the XSLCompiledTransform class, go to XslCompiledTransform Class.

The mapper now uses the XslCompiledTransform class, a class which was the result of a redesign of the XSLT architecture in the Visual Studio 2005 release (.NET 2.0 timeframe).  While load time of a transform using this class can be longer (since the transform must be compiled upon load), if cached it can yield a 4-fold performance improvement for transforms. Will we see this same level of improvement when used within the context of a BizTalk map? Not quite, but it will definitely be noticeable.

There is a fairly detailed blog post on the XslCompiledTransform class from the XmlTeam written around that time as well. I’m not going to re-hash all of that content here, though you should definitely take a look at the table under the Discretionary Behaviors heading. That table will unveil some things (read: strange edge cases) that used to “just work”, but will now cause exceptions.

Instead of focusing on performance improvement or weird edge cases, in this post, I wanted to look at something a little more common. It surfaced for our team as we were migrating some custom functoids from BizTalk Server 2010 to BizTalk Server 2013. Essentially what we found was that if you attempted to return a null value from a custom functoid, you would receive this error message:

ErrorFunctoidException

For the benefit of those using Google-fu to attack the same problem, the exception message reads: “Extension functions cannot return null values.”

Really this exception would occur regardless of using a custom functoid. Indeed, you can re-create the same behavior with a Scripting functoid returning null out of an inline C# method.

How to Return Null

This all begs the question, how am I supposed to return null? Well there are a few different cases to consider.

If you’re returning null because it’s cleaner than an empty string, but empty string is not considered a special value on its own, then it’s fairly simple. Toss a null coalescing operator between whatever value might be null and string.Empty. That was the fix that handled our case nicely:

 public string GetError(string lookupId)
{
	return CachedDatabaseAccess.GetError(new Guid(lookupId)) ?? string.Empty;
} 

While that will cause the desired result in the destination message in this case, if I wanted to output null to the destination message I have a few choices still. I can still return string.Empty which will create an empty node in the document, use one of the Logical functoids to prevent a node from being created when it does not return true, or use the Nil Value functoid to set set the output as nil (assuming the destination schema allows it).

Passing Null Around

But what if I’m returning that null value so that it can be passed to another functoid? If both are scripting functoids and they’re both using inline script, I can do this quite easily by making use of a global variable within the map (in the screenshots below it is named result1), and then writing my code to access that in order to request the raw result.

NOTE: This is also a pattern we encourage for maintaining the state of .NET objects through chained functoids (since if they are returned directly the ToString method is called)

scriptfunc1

scriptfunc2

That’s all fine and good when things are inline C#, but what if I’m wanting to pass an earlier null value as an input to an external assemblies? Well that’s where things get a little bit trickier. Best bet there right now is to establish a special non-null value that can represent null, and pass that to an external method that wraps a call to the method you actually want to call and translates that value. Either that, or write custom functoids that can share a set of ThreadStatic values and have one of them wrap the call to the external method (though that might be a little bit overkill).

Wrapping it Up

Even though I’ve spent my time talking about one small annoying aspect of upgrading, let me tell you it’s a worthwhile price to pay for the massive performance improvements you’re going to see.

If you want to see how that custom functoid turned out, and interact with it yourself, be sure to check out one of our upcoming BizTalk Server 2013 Developer Deep Dive courses!

See also:

BizTalk Server 2013 Road Show

During the month of May QuickLearn will be collaborating with Neudesic and BizTalk 360 to bring a special BizTalk 2013 Event to major cities across the US. Discover how to transform your business with BizTalk Server 2013.

This invitation only event is designed to help you:

  • Connect and automate your existing assets to maximize the value of your IT portfolio.
  • Increase agility and reduce your TCO by leveraging the cloud and hybrid-cloud.
  • Enhance productivity by bridging the gap between your datacenter and employees.
  • Deliver innovative applications and solutions that integrate with new and existing assets.
  • Extract, report, analyze, publish and share information company-wide, in real time.
  • Extend LOB applications securely beyond traditional network and business boundaries.

Get a Sneak Peek at BizTalk PaaS*
We’ll be sharing yet-to-be-released features of PaaS, so all guests who attend the Sneak Peek session will be required to sign a Confidentiality Agreement with Microsoft.

Reserve button

Newly updated tfs 2012 (Update 2) courses coming to the UK in june

QuickLearn is excited to be heading to the UK to deliver our leading courses on Microsoft Visual Studio Team Foundation Server. These courses have just been completely refreshed to  cover the latest features Microsoft have included in Update 2.

Here is a list of the TFS 2012.2 courses we’re running in June. These courses are confirmed to run and if you book soon you’ll still get early bird registration!

What’s more, we’re bring our Remote Classroom Instruction (RCI) solution with us so you can attend our courses online from anywhere in the UK and nearby time zones!

Attend our TFS courses from any of these time zones

London_TZ

Courses will run from 9:30am to 5:00pm GMT (London time). Please consider this when booking.

BizTalk Server 2013 RTM

QuickLearn is very excited to share the news that BizTalk Server 2013 is now available for download on MSDN. The eighth release of BizTalk Server has been much anticipated and promises to be the next step in the on-going investments in BizTalk. In the near future, we can look forward to announcements that include Infrastructure as a Service (IaaS) capabilities as well as Platform as a Service (PaaS) capabilities. Read the blog from the BizTalk Team and download the new bits.

For the on-premises BizTalk Server 2013 release, Microsoft has focused on the following themes:

  • Improved Performance
  • Simplified Development and Management Experience
  • Cloud Connectivity
  • Running BizTalk Server in the cloud (IaaS)
  • Support for the latest platform and standards

Rob Callaway released a blog about his favorite features in BizTalk 2013. Behind the scenes, we have been working tirelessly to update our courses to BizTalk Server 2013. You can look forward to QuickLearn’s BizTalk Server 2013 training calendar coming soon!

If you haven’t already filled out the BizTalk 2013 Survey (or your answers have changed), check it out!

TFS 2012 Pre-conference workshop at tech-ed 2013

I received some great news a little while ago that I have been selected to present a one day pre-conference workshop at TechEd 2013 in both North America (New Orleans) and Europe (Madrid).

If you’re planning on attending TechEd this year, why not head in a day early and get some great hands on experience using Microsoft Team Foundation Server 2012. The breakout sessions and keynotes are always great but for many, a day spent getting hands-on with Microsoft’s ALM platform might be just what you need.

The pre-conference workshop I am delivering is titled “Kickstart Your Application Lifecycle Management Using Team Foundation Server 2012”. I’ve included the session abstract a the bottom of this blog post.

To attend one of the pre-conference workshop, simply choose one of the registration options that includes a pre-conference seminar. Eg.  “Early Bird Pricing + Pre-Conference Seminar”. Even if you’re not attending the full conference, you can attend the pre-conference seminar by itself. [More information]

QuickLearn’s BizTalk instructors have also submitted breakout session proposals and hopefully we’ll have some good news to share on that front in the next week or so.

SESSION ABSTRACT

Frequently Microsoft Team Foundation Server (TFS) finds its way into organizations through well intentioned developers taking it upon themselves to install and configure it. Unfortunately this usually leads to a very ad-hoc usage of the product that fails to deliver the real benefits of an integrated Application Lifecycle Management suite.

In this workshop we start by setting ourselves up with a brand new Team Project on TFS 2012 and then proceed to configure everything required to get our team ready for their first iteration.

This pre-conference workshop is designed to help attendees learn how to get projects started using Microsoft Team Foundation Server. The range of topics covered in this level 200 workshop have been selected to ensure attendees cover the primary areas of value in the product.

Attendees to the workshop receive workshop notes in electronic format which including the hands-on lab exercises, as well as a comprehensive list of resources that they can use after the conference to get up to speed with TFS.

New TFS 2012 Test Automation, Web perf and loading test course

NEW COURSE ANNOUNCEMENT

QuickLearn is pleased to announce the addition of a brand new course to our list of TFS 2012 courses we currently offer. The new course is a two day course focusing on Test Automation (Coded UI Testing), Web Performance and Load Testing with Visual Studio 2012.

Here are just a few of the things covered in this course.

  • Describe the various testing capabilities in Visual Studio 2012
  • Create Coded UI Tests from action recordings and using the Coded UI Test Builder
  • Understand the structure of Coded UI Tests and edit the generated code
  • Bind Coded UI Tests to a variety of different data sources
  • Run automated tests in a number of environments
  • Upgrade existing web performance and load tests from Visual Studio 2010
  • Create and edit Web Performance Tests and analyse test results
  • Create and edit Load Tests and analyse test results
  • Configure an environment for executing Web Performance and Load Tests

This course is more technical than our existing testing course and attendees will spend much of their time working in Visual Studio 2012. While attendees won’t write any code from scratch, being able to read and understand VB or C# code is required to get the most from this course.

This new course joins our existing 2-day course “Software Testing with Visual Studio 2012” to provide excellent coverage of the testing features available in Visual Studio 2012.

Two Testing Courses

This new course has already been delivered successfully in overseas markets and is scheduled to run here in the US on the following dates over the next few months.

You can attend this training in-person in our Kirkland, WA office or you can attend remotely from your home or office using our remote classroom infrastructure.

Remember, QuickLearn has a no-cancellation policy so if you book on these courses, they will definitely run!

Announcing new free webinars for Microsoft ALM Certification

MSDN-ALMMicrosoft Learning used the ALM Summit 3 this week to announce the new “Microsoft Certified Solution Developer (MCSD): Application Lifecycle Management” certification. The new certification required you to pass the following three exams.

  1. 70-486: Administering Microsoft Visual Studio Team Foundation Server 2012
  2. 70-497: Software Testing with Visual Studio 2012
  3. 70-498: Delivering Continuous Value with Visual Studio 2012 Application Lifecycle Management

QuickLearn’s two TFS instructors have both already obtained this certification and have prepared comprehensive exam preparation sessions to help candidates focus their study and pass these exams.

The exam preparation sessions are available as FREE, ONLINE WEBINARS that anyone can register to attend. Over the coming month we’ll also release online video preparation sessions.

Attending these webinars will help you in the following ways.

  • Understand the goals and objectives covered in each exam.
  • Get links to study material on the Microsoft MSDN website.
  • Go through some samples questions.
  • See product demonstrations for topics listed in the exam preparation guide.
  • Learn techniques to help you when you’re doing the actual exams.

To sign up for any of the free webinars, simply click the following link, choose the webinar you wish to attend and register.

SESSION DATES/TIME and REGISTRATION LINK

NOTE: We do not tell you the questions or the answers. We provide sample questions that we have written ourselves. We respect the NDA we signed prior to taking these exams. We do not encourage the use of brain dumps. Brain dumps devalue the certification and reduce value for everyone.

QuickLearn Training at the ALM Summit 3 event

This week QuickLearn was involved at the third annual Application Lifecycle Management Summit held on the Microsoft Corporate headquarters in Redmond.

ALMSummit3

Nick and I were both involved in delivering content and sharing our TFS knowledge and skills with attendees. Here are the two activities we presented.

Pre-conference workshop

I delivered a sold-out pre-conference workshop entitled “Managing your application lifecycle with TFS”. The workshop provided attendees with a rapid overview of many of the features of Microsoft’s ALM suite. Based on the number of questions from attendees, there was a lot of interest in the new features in TFS 2012.

WP_20130128_009

Exam Cram Session

Microsoft took the opportunity to announce the brand new MCSD: Application Lifecycle Management certification at the conference. Nick and I paired up to deliver a 90 minute exam prep session to help attendees learn the best way to prepare for the three exams required for the new certification. Fortunately, both Nick and I both already have the certification so this made things a little easier.

WP_20130128_003

Feedback from both activities was overwhelmingly positive and with our commitments done, we’re both just enjoying attending sessions at the conference for the rest of the week.

Announcing BizTalk Server 2013 Virtual Labs

IMPORTANT: With the release of the IaaS functionality in Windows Azure, the Virtual Machine templates for BizTalk Server 2013 have been updated and no longer include Visual Studio 2012. Due to this, it is not currently possible to complete these lab activities as provided. We will update this space with more information as it is available.

QuickLearn is pleased to announce the availability of two hands-on labs that you can run from within your BizTalk Server 2013 Beta virtual machines running on Windows Azure.

These labs, originally presented at the BizTalk Summit in December, will provide an early look at the new features coming with the BizTalk Server 2013 release, while demonstrating live integration with the Salesforce.com online CRM system.

To complete either of the activities, follow the instructions below:

Lab #1: Integrating BizTalk Server 2013 with Salesforce using a Windows Azure Service Bus Relay

  1. Create a Windows Azure Virtual Machine using the BizTalk Server 2013 Evaluation Template. All setup scripts assume that you are using the Evaluation template, and not the Standard or Enterprise editions.
  2. Start, and then Connect to the Windows Azure Virtual Machine once provisioned.
  3. Inside the image, launch Powershell
  4. At the powershell prompt, type and execute the following command to setup and start the lab:
    (New-Object Net.WebClient).DownloadString("http://labti.me/biztalksalesforce")| iex
    
  5. In the setup wizard, type the user name and password you used for the account that you created when provisioning the virtual machine, and then click Next.
  6. Once setup completes (5-15 minutes depending on image size selected), in the Internet Explorer window, type your First/Last/Email and then click Start Lab

Lab #2: Accessing Salesforce data through the REST API using the WCF-WebHttp Adapter

  1. Create a Windows Azure Virtual Machine using the BizTalk Server 2013 Evaluation Template. All setup scripts assume that you are using the Evaluation template, and not the Standard or Enterprise editions.
  2. Start, and then Connect to the Windows Azure Virtual Machine once provisioned.
  3. Inside the image, launch Powershell
  4. At the powershell prompt, type and execute the following command to setup and start the lab:
    (New-Object Net.WebClient).DownloadString("http://labti.me/salesforcerest")| iex
  5. In the setup wizard, type the user name and password you used for the account that you created when provisioning the virtual machine, and then click Next.
  6. Once setup completes (5-15 minutes depending on image size selected), in the Internet Explorer window, type your First/Last/Email and then click Start Lab

If you would like to see a walkthrough of this process, you can watch the video below:

Launching a QuickLearn Lab on Windows Azure from QuickLearn Training on Vimeo.

Introducing the Visual Studio ALM Rangers – Nicholas Hauenstein

We would like to congratulate Nicholas Hauenstein, the most recent addition to the Visual Studio ALM Rangers! Nick was nominated for his subject matter expertise and contribution to the ALM community.

Nick is currently working on study materials for:

  • Exam 70-496: Administering Visual Studio Team Foundation Server 2012
  • Exam 70-497: Software Testing with Visual Studio 2012
  • Exam 70-498: Delivering Continuous Value with Visual Studio 2012 ALM

More information on these study materials will be announced soon.

Nick joined the ALM Ranger because he wants everyone to succeed with their endeavors, and have the best guidance and tooling available in that pursuit. Nick says, “I’ve already gained immensely from ALM Ranger deliverables (e.g., the Branching and Merging guidance, and the Visual Studio Build Customization Guide), and am excited for the opportunity to give back where I am able.”

See Nick’s announcement and interview on Willy-Peter Schaub’s MSDN Blog.