ValidateInstance Not Found When Setting Up BizTalk 2009 Unit Tests

Today I was setting up Unit Tests for BizTalk 2009 Schema and Maps.  I was using the BizTalk Server 2009 help guide example as a reference. 

I ran into the following error message:

<Class Name> does not contain a definition for ‘ValidateInstance’ and no extension method ‘ValidateInstance’ accepting a first argument of type <Class Name> could be found (are you missing a using directive or an assembly reference?

This looked like this inside Visual Studios 2008:

 

This was caused by the referenced Schema project not being marked to Enable Unit Testing.  This setting can be found under the Product Properties.

Just simply change this to true, rebuild the Schema and Maps Projects, and the Unit Test methods should now be able to find the ValidateInstance or other missing methods method.

When Unit Testing BizTalk 2009 Map projects, the ValidateOutput method may not be found.  While I did not have problems with creating mapping unit test the solution would be the same.

Enjoy.

BizTalk Server 2009 Now on MSDN

The latest edition of BizTalk Server is now available on MSDN.

The following editions are available for download (this may vary based on your MSDN subscription):

  • Developer Edition
  • Branch Edition
  • Standard Edition
  • Enterprise Edition

I only see the x86 version of each product available for download right now.

 

BizTalk Server 2009 has the following enhancements and improvements over the past version of BizTalk:

  • Support for .Net 3.5 SP1 and Visual Studios 2008 SP2
    • XSLT Debugger in Visual Studios
    • Support for Unit Tests in Visual Studios
    • Full Application Life Cycle Management
  • Windows 2008 and SQL 2008
  • Support for Hyper-V
  • New ESB Guidance 2.0
  • Mobile RFID
  • Updated and enhanced EDI, AS2, and SWIFT
  • New SQL Server Adapter

 

Important Notes:

  • BizTalk 2009 will support SQL 2005
  • HAT and HWS will be deprecated

 

In addition to BizTalk Server 2009, the 2009 Accelerators, 2009 Adapters for Host Systems, 2009 Line of Business Adapters, 2009 RFID, and 2009 Host Integration Server are also available.  These are all under the BizTalk Server 2009 section under Servers.

Designing Services for Management & Scale with Dublin Session at the SOA Conference

If you are headed to the SOA & Business Process Conference in Seattle this week and you have an interest in Dublin (Microsoft’s new extensions to windows to host WCF and WF) make sure you check out my session.  I will be presenting with Kent Brown from Microsoft.

The abstract is below.

Abstract:

Dublin is the code name for the new Windows Application Server features inside Windows. In this session we will take a look at how to build a service to leverage the management tools inside Dublin to gain insight into the health of running services. We will show how simple it is to configure Dublin to custom track custom values inside message payloads. Once tested, deployment and migration of the service to a new environment will be demonstrated.

BizTalk 2009 and ESB 2.0 Now Available for Public Beta

Today Microsoft has released the Beta for BizTalk Server 2009 to the public. 

It is available on Microsoft’s Connect site at https://connect.microsoft.com/site/sitehome.aspx?SiteID=218

This beta will be community supported though the Microsoft TechNet forums here.

Some of the key enhancements to BizTalk 2009 is support for the latest Microsoft offerings (including Windows 2008, Visual Studios 2008 SP1, .Net 3.5 SP1, SQL 2008, and TFS), support for RFID Mobile, and new LOB Adapters (including a new SQL Adapter). 

A new release of the Enterprise Service Bus Guidance is available on CodePlex (http://www.codeplex.com/esb).

Step by Step: Working with Content Based Correlation in Workflow 4.0

Don’t miss the screen cast video on this same subject available at Content Based Correlation in Workflow 4.0

Content based correlation is used when you send a message out of a long running workflow and need to get a response back later into that same workflow using information contained inside the original message.  In this case, the correlation needs to be stored and made available to match the response message.

Content based correlation is easy to set up and use inside Windows Workflow 4.0.  At a high level you need to do the following:

  1. Create a Correlation Handle variable to use for the correction
  2. Set up this variable and xpath on the Send Activity
  3. Set up this variable and xpath on the Receive Activity

It is that easy! 

Lets take a look at this process step by step.

First, set up a new Variable inside the workflow.  In the picture below, the variable is named OrderCorrelation. 

Using the Type Picker and the Search box on the top right, search for CorrelationHandle.  Select the value under the WorkflowServiceModel as seen below.

Now we use this variable on the Send Activity that needs to set up the correlation.  Select the Send Activity and press F4.  When the properties window opens, go to section 4 – Send Message Correlation.  Here we need to set three values.  First, set the variable in the Correlation Handle box and then select the correct endpoint from the drop down as seen below.

The third value to set on the Send Activity is the XPath values to use for the content based correlation.  Below, we set up an OrderIdQuery with an XPath of //temp:OrderId.  OrderId is the variable name of the value in the output message we want to correlate on.

When it is all done, the Send Message will look like the picture below.

The same process is followed on the Receive Activity.  Make sure to use the same Correlation Handle.  The end result of the Receive Activity is shown below.

 

And you are done!  It is that easy to set up content based correction inside Workflow 4.0. 

BizTalk vs Dublin – Do Not Get Confused

I was reading an interesting blog post today called Will Dublin Replace BizTalk?

It got me thinking more about this and I wrote up the response below.  I would love to hear other peoples comments and thoughts on this.  I see a clear separation on when you would use BizTalk vs when you would use Dublin.  I see a great story going forward with both technologies working together.  

I welcome comments and feedback on this. 

Comment on “Will Dublin Replace BizTalk?” blog post:

“I like your article on Dublin and BizTalk but wanted to comment on a few parts.

As someone who makes a living working with BizTalk Server my ears perk up when I hear “it is going away”. I heard this same kind of talk three years ago when Microsoft introduced Workflow in .Net 3.0. I for one was confused about how Workflow would fit in with BizTalk. And now, BizTalk is bigger and stronger than ever.

Why? Because it does a great job inside the enterprise for the scenarios it is designed to address such as system and application integration, connectivity, transformation, and monitoring, just to name a few.

What I see Dublin (and .Net 4.0) doing is taking some of the best features of BizTalk and making them accessible to other parts of the enterprise that might not have requirements that call for a full and robust Integration Server. With Dublin specifically, it is the management and monitory concepts from BizTalk that we can see inside the Dublin code from PDC.

Will there be scenarios that now make more sense in a Dublin environment than BizTalk? Of course. Will all scenarios fit into Dublin – not a chance.

Even today I hear the question, “Why would we pay for BizTalk?” And for some customers BizTalk is not the right answer. For those customers they will now have Dublin to look at rather than having to custom build a solution.

It often comes down to a cost to buy vs. cost to build analysis. On an individual project basis this sometimes becomes a difficult decision. When you think enterprise wide, typically the cost to buy a supportable product with a core set of features is the better answer. With BizTalk, you get adapters, high availability, robust development tools, EDI, RFID, flat file parsing, administration, BAM, etc. While some of these items are being moved further down into the stack, not all of them will be.

The buy vs. build analysis will become more difficult. I think that is a good thing. The end goal is to do more with less and to lower the cost for consistently delivering supportable and maintainable code that meets the requirements. I think Dublin (and .Net 4.0) helps us down that road. In my mind, I’ll always see a need for BizTalk and will continue to recommend it to my clients as a core component in the enterprise when it makes sense.

I do not foresee a world without BizTalk, but I am excited about the world with options that include BizTalk and Dublin.

If you are looking for more information on Dublin, I have a screen cast available (http://www.biztalkgurus.com/media/p/21919.aspx) and a high level visual review of Dublin (http://www.biztalkgurus.com/blogs/biztalk/archive/2008/11/10/first-look-screen-shots-of-windows-application-server-dublin.aspx) available on my web site.

Stephen W. Thomas
www.BizTalkGurus.com

Screencast: Content Based Correlation in Workflow 4.0

What is Correlation? 

Correlation is when a process sends a message out and that same process is expecting a response to be returned to the same instance of that process. The complexity rises when the messaging patterns become asynchronous or the process becomes long running.  Asynchronous and long running processes are a common scenario inside business processes today.

BizTalk Server is great at correlation inside Orchestrations given the publish and subscribe architecture of BizTalk Server. BizTalk supports both system based correlation (based on a Send Port or File Name) and content based correlation using specific values inside the message.  Content based correlation fits a greater number of scenarios. 

Workflow 4.0 has the ability to do content based correlation and it looks and feels a lot like BizTalk (which is a good thing).

I have put together a short screencast video to walk though setting up content based correction inside Workflow 4.0.  To set up content based correlation in Workflow 4.0, you first create a correlation variable of type CorrelationHandle. Then, you set this variable and xpath on the corresponding send and receive shapes. This video takes you through the process step by step.

Watch the video live via Flash or download the Windows Media version.

First Look Screen Shots of Windows Application Server – Dublin

Make sure you check out the video content on Dublin available on BizTalkGurus.com:

First Look at Windows Application Server (Dublin)

Dublin is the code name for the new Windows Application Server components.  At the core, Dublin is designed to be a hosting environment for Windows Workflow and Windows Communication Foundation based applications.  It integrates into IIS and provides eight new features out of the box. 

If you have worked with BizTalk Server 2006 in the past, as we walk through the next few screen shots keep saying to yourself…. “this is not BizTalk this is a new Application”.  The likeness to BizTalk 2006 will make adoption by fellow BizTalkers straight forward.

Setup and server configuration of Dublin is done though the Windows Application Server Configuration tool.  This is seen below.

Drilling down into a specific section on the left (such as Runtime) will show the specific configuration for that item.  The look and feel of this configuration is just like it is inside BizTalk Server 2006.

Once setup and configured, Dublin is currently managed though IIS.  The picture below shows these eight new features.  These are added under the WCF/WF Services section.

We will take a closer look at each new feature.

Application Export – This is used to export an Application.  You get a nice simple interface as seen below.

Application Import – This is used to import an Application.  You have the ability to configure parameters during import as seen below.

Database Configuration – This is used to configure the default Persistence and Monitoring database for this instance of Dublin.

Diagnostics – This is used to set up Tracing and Message Logging. 

Persisted Instances – Clicking the Persisted Instances icon launches the window below.  This is an organized view of the count and status of workflows for a given application.  All the items listed are links that can be clicked on to drill down into a specific section.  This view is just like the BizTalk Server Admin tool.

Services – Based on the selected scope, this will show you the Services inside the Virtual Directory.

From the Services Pane you can drill down into more detail by right-clicking and selecting Persisted Instance from the context menu (this can also be done from within Persisted Instances view above).  You have the ability to Suspend, Terminate, Abort, or view Tracking Data about specific instances as seen below.

Selecting View Tracking Data will view available tracking data for this workflow, as seen below.  Double clicking on a specific tracking record will give more details on that specific item.

Tracking Configuration – Tracking configuration lists the available profiles that can be applied to an application.  Out of the box are three profiles, Basic, Verbose WCF, and Verbose Workflow.  In the picture below, BestPetServiceTracking is a custom tracking profile used to track user specific values.

Tracking Profiles – Custom tracking is just a few clicks away inside Dublin.  Once a custom tracking profile is created, it can be uploaded and made available to use for tracking.  Inside the labs, Microsoft provided a Tracking Profile Editor (just like the one in BizTalk) that can easily create custom tracking profiles based on a workflow.

 

I hope this gives you a quick overview of Dublin, Microsoft’s new Application Server.  For anyone that has worked with BizTalk in the past, working with Dublin will come naturally.  Enjoy.

First Look Screen Shots of Workflow 4.0

Make sure you check out the video content on Workflow 4.0 available at BizTalkGurus.com:

Consuming WCF Services in Workflow 4.0

Flowcharts and Rules in Workflow 4.0

Windows Workflow 4.0 is a major upgrade to the existing Microsoft workflow technology.  As part of this upgrade, the designer has been enhanced to account for new features and increase the developer experience.  Below is a screen shot of a basic sequential workflow.

A cool feature, that is not shown here, is the dynamically changing gray arrows.  If a new shape is dragged over between the Persist and Delay shape above, the gray arrow would expand. 

On the bottom left of the surface is the new Variables window.  This somewhat resembles BizTalk’s variable experience inside the Orchestration. 

The out-of-the-box Activities are a little different as well with some 4.0 additions.  Keep in mind this is Beta code so more Activities could be added or removed at any time.

In the list above, you can see a new Flowchart activity.  This represents the new flowchart workflow style.  The Flow Decision and Flow Switch are part of this new style as well.  Below is a completed flowchart workflow.

When working with flowcharts, you drop a Flow Switch (Yellow square with White X above) and draw lines from this shape to others following the path the logic should flow.  The Flow Switch behaves similar to a CASE statement.

The above flowchart uses the Workflow 4.0 Rules.  A sample rule is below.

Some new enhancements with the WCF and WF interactions now make communication easier.  Below is the windows to configure inputs and outputs from a WCF message based Workflow. 

 

One of the best features of Workflow 4.0 is the real-time validation on the variable fields.  Inside an Assign shape for example, when you tab out of a cell that variable name is checked to ensure it exist.  If not, you get a red X and a pop-up message.  Due to my poor spelling, I am sure this will save me countless hours over the years.

Overall I found the new designer easy to use and it made sense to me – mostly due to the likeness to the Orchestration designer in BizTalk.

Hope this post gives you a quick first look at the new Workflow designer.  Enjoy.