Archive for December, 2008

WCF-SQL Adapter Modernizes BizTalk SQL Adapter Capabilities

In my spare time I have been playing and testing all of the latest released capabilities of BizTalk Server 2009. During some of my time I have been working with the new WCF-SQL adapter that exposes a new WCF binding, SqlBinding, as part of the latest Adapter Pack. If you have ever worked with the BizTalk SQL adapter you know that the wizard in Visual Studio frequently caused problems and unfortunately these shortcomings were never adequately addressed in a service pack or updated release. Usually it was required that you just take a working example of the SQL adapter and then manually modify it to work with your database objects. More often than not you probably just avoided the SQL adapter completely and worked with the database through ADO.NET calls in an orchestration or custom pipeline. Now with the updated Adapter pack the WCF-SQL adapter finally modernizes the SQL adapter experience and gives you a stabile and very functional environment for interacting with SQL via an adapter. This article will highlight some of its capabilities and provide a walkthrough of the new WCF-SQL adapter wizard.

All of my testing has been with the BizTalk 2009 Beta loaded on a Windows Server 2003 box with Visual Studio 2008 (including SP1) installed. I installed the BizTalk Adapter Pack found at https://connect.microsoft.com/content/content.aspx?ContentID=10580&SiteID=218. To add a schema based on the WCF-SQL adapter, open or create a BizTalk project in Visual Studio 2008 and right-click on the project. Clcik on the Add New Item > Add Generated Items as shown below:

wcf-sql_1-1

Then after the window loads you should see the following window:

wcf-sql_2-1

Click on "Add Adapter Metadata" and then click "Add". This will open up a general window that is used for several different adapters. After installing the BizTalk Adapter Pack V2, you should see an item listed in the listview called WCF-SQL. You should also see the older SQL item listed as well as any other Adapter Pack or Line-of-Business (LOB) adapters. You will need to enter a SQL server name and database in the combo boxes below the listview. I entered my local SQL Server instance and my BizTalkMgmtDb as seen in the screenshot below:

wcf-sql_3-1

You do not need to enter a port for this adapter so just leave this one blank and click Next. The following screen shows the form that is loaded next to help you determine which SQL objects to include in the WCF-SQL schema. If you worked with the previously mentioned rudimentary SQL adapter in BizTalk, at this point you would be presented with the option of entering a command text or a single SQL object name for the wizard to use to generate the schema. But the WCF-SQL adapter wizard provides database object browsing and filtering to further simplify the task of schema generation. The following screenshot shows the form when it is initially loaded:

wcf-sql_4

If you merely want to use the database you specified earlier in the wizard, click the configure button and then click OK to generate the default URI of mssql://.//?. Then click Connect to connect to the database specified. This will enable the bottom half of the screen where you can expand the categories of database objects and then find one or more objects to select. It is also possible to select a different database and/or configure additional database connectivity properties via the Configure button’s window. Below is an image of the Configure button’s window with the SSO database details specified:

wcf-sql_5

I have found that it is not possible to specify "(local)" for the SQL instance name as shown above so do not try this. Below is the form changed to allow selecting from several of the SSO databases’s tables:

wcf-sql_6

The "Search in Category" box in the middle of the form provides a way to filter the list of database objects. I have found that it is possible to use wildcards in this box by the percent character "%" but not by the asterisk – "*". Once you have selected objects to generate a schema for, click OK. Visual Studio will generate a schema and a related code class as well.

The designer experience provided by the WCF-SQL adapter wizard is a huge step forward for the creation of BizTalk SQL schemas.

, ,

1 Comment

BizTalk Dream Machine

I have been playing with the new features of BizTalk 2009 and have been finding a few bugs. But some of what is available with this release is awesome. For example, due to Visual Studio 2008 integration you can reference a WCF Service library from your BizTalk project. You can also reference a project that uses LINQ so will be able to use LINQ indirectly in a BizTalk map. Another cool thing is that you can reference a WF library from your BizTalk project. This makes it possible to call a WF method directly from BizTalk and potentially move logic over to a WF process from BizTalk. I have not tried running a workflow from the BizTalk host but that will be the next thing to try. I have not seen any new BizTalk orchestration shapes for calling WF activities or workflows either.
 
The new UDDI functionality included with the BizTalk 2009 beta is a little buggy at this point but the functionality seems to be a big step forward. More details on this soon.
 
Lots of the wish list ideas I have had for where BizTalk could be going are things I am testing right now. Check back here as I find new features as part of the beta.
 
Thanks,

, , ,

Leave a comment

BizTalk Server 2009 Public Beta Released Today

Today Microsoft released the public beta of the next version of BizTalk, BizTalk Server 2009 and it is available for download at the Microsoft Connect site – http://connect.microsoft.com/site/sitehome.aspx?SITEID=218. The latest version of the Microsoft ESB Guidance was also released at the same time and is available at the same CodePlex location – www.codeplex.com/esb. There are quite a few updated BizTalk features with this release and I will be showcasing some of these features in the next couple days.
 
There were a couple of installation gotchas that I noticed initially with BizTalk 2009. I worked with BizTalk 2009 during the Microsoft TAP program a few weeks ago and have already installed it once. The 2009 TAP install did not require you to run Visual Studio 2008 SP1 but the new BizTalk release does require this so be sure to do this before running the installer. The 2009 install will add the Visual Studio extensions to Visual Studio 2008 so that you can now include your .NET 3.5 projects right alongside BizTalk projects.
 
The developer tools will not be enabled as an install option without Visual Studio 2008 SP1. Since BizTalk 2009 is in beta you will want to report any issues to Microsoft as part of the feedback link on the BizTalk 2009 connect site or report it at the MSDN forums under BizTalk – http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=1470&SiteID=1.
 
The ESB Guidance no longer includes JMS features so you if you have been using JMS subscriptions with the ESB Guidance, do not upgrade at this time if you want to continue using JMS.  
 
Thanks,

, ,

Leave a comment

SharePoint Workflow Services

I was working recently on a SharePoint Workflow project and was exploring some of the Office SDK samples. The latest Office SDK (http://www.microsoft.com/downloads/details.aspx?familyid=6D94E307-67D9-41AC-B2D6-0074D6286FA9&displaylang=en) includes samples that were built for VS 2005 but you can convert nearly all of these over to work with VS 2008 using the .NET conversion wizard. I was exploring one of these samples and found some code that worked with IWorkflowModificationService and then realized that there are at least 4 workflow services exposed by the SharePoint workflow host. The IWorkflowModificationService (as documented at http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.workflow.iworkflowmodificationservice_members.aspx) has just a single exposed method for EnableWorkflowModification(). This method performs some of the same functionality that that the activity shape Microsoft.SharePoint.Workflow.EnableWorkflowModification performs. Then I noticed that in the workflow designer in VS 2008 this activity actually has an InterfaceType which referes to IWorkflowModificationService. Interestingly, when I clicked the … on this part of the property box the object explorer filtered my referenced assemblies by ExternalDataExchangeAttribute and gave me the filtered window as seen below:
 
 
The items listed above are the four available workflow services provided with the SharePoint Workflow host. For this reason a considerable number of the built-in SharePoint activities are just wrappers that work with the workflow services. This was a very interesting find for me because it helps me to understand the way that workflow services are working under the surface the SharePoint workflow host.
 
While I was looking at the MSDN documentation for IWorkflowModificationService I also found there is good documentation for these other workflow services including ISharePointService, ITaskService, and IListItemService. Because these are exposed you can quickly come up with the implementation behind most of the built-in SharePoint activities.
 
Thanks,
 

,

2 Comments