Take A Look At The BizTalk Server Solution Designer

There is a 52 minute video on BizTalk Solution Designer.  If you do not have a full 52 minutes to devote to this, you can get a good feel for the tool in the first 15 or 20 minutes. 



BizTalk Solution Designer is a visual tool for Biztalk Development.  It abstracts the whole process of building port, locations, pipelines, routing, and more into a visual tool. 



This new tool is targeted toward the business developer but is will not be available any time soon.  It will not be available until after Biztalk 2006 is released.



They showed some of the prototypes that this tool could have looked like.  I liked the Saturn design myself…


 


I really wanted to see the new XSLT visual mapper.  I think mapping in an integration solution is under valued (i.e if the map is wrong or does not work the whole solution is worthless).  But, they did not cover it. 



If they keep making BizTalk development so easy, they are going to put me out of a job.



You can get more details from Scott’s post or go directly to the Solution Designer Video.



Channel 9 also has a Windows Workflow Video available too.


 

Sequential Workflow Using Windows Workflow Video and Sample


I have put together a video and sample walking through a simple Sequential Workflow using Beta 1 of WinWF (available for download from Microsoft).



This video will take you step by step through creating your first sequential workflow in less than 15 minutes!



This workflow is hosted by .net using a Windows Form.  It takes in an input value and returns a string of how long it took to process the order.



The sample includes two windows form for calling the workflow. 



Download the sample code: Sequential Workflow using WinWF


Download the video: My First Sequential Workflow Video


 

Windows Workflow (WinWF) Released



Today Microsoft released the long awaited Windows Workflow Foundation at PDC. 


 


You can get all the details from the Windows Vista Development Center for Workflow


 


Microsoft’s awesome new Windows Workflow Community Site is located at http://www.windowsworkflow.net.



WinWF will provide a framework for building and hosting workflows inside Windows.  It will be part of the WinXF namespace along with Windows Communication Foundation (Indiago) and Windows Presentation Foundation (Avalon).



The Beta Code for WinWF is available though the Vista Development Center.



Watch for samples and videos to be posted shortly to my Windows Workflow Foundation page.


Convoys, GetTempFileName, and InterceptorException in Biztalk Server

It’s late on a Friday.  I am still at the client site.  I just canceled my flight home.  It is my anniversary weekend (yep it is on 9/11, sure sucks).  We are hours from going live…  But, what does Exceptions.Types.InterceptorException GetTempFileName Failed mean?



I ran into this problem while testing some recently updated Orchestrations that use Convoys to process messages received from multiple source systems in order.  A small change was made that removed a Send Shape and replaced it with a custom .net component call to a java web service.  Seems simple enough.



When the process encounters an exception, it uses the file adapter to write the file to disk and stops message process.  That all tested perfectly.



When the process completes successfully but no other messages have arrived in the convoy.  That all tested perfectly.



When the process completes successfully but new messages have arrived in the convoy the follow error occurs:



Exceptions.Types.InterceptorException


GetTempFileName Failed.


       


Exception type: StreamingException


Source: Microsoft.BizTalk.Streaming


Target Site: System.IO.Stream CreatePersistentStream()


Help Link:


Additional error information:



Not only do I get an exception, but the process continues forever in an endless loop with a 100% CPU spike.



So, what could be the problem and more importantly how can it be fixed? 



The answer lies with the change that was made by replacing the Send Shape with a .net component call.  This removed a persistence point in the Orchestation.  In fact, it removed the only persistence point for the happy path (i.e. no errors) inside the Orchestration.  So, when this message is processing, a 2nd message arrives in the convoy, and the next Receive Shape is hit the whole process goes down hill.



Solution:  I added an Atomic Scope (persistence point) right after the Receive Shape.  Problem solved. 



A better solution: Isolate the units of work inside the Orchestration into logical units and use Atomic scopes to track progress through the Orchestation.  In the event of a Server Crash, the Orchestrations would restart in more desirable state.


 


Even better solutions?  I’m sure. 


 

Biztalk 2004 Development Helper Tool – A Must Have

A lot can be said about development with Biztalk Server.  For someone new to Biztalk it takes a little practice to learn some of the non-intuitive tasks related to assembly redeployment and basic Biztalk Development.



One common error message is:


Some items in the removed assembly are still being used by items not defined in the same assembly, thus removal of the assembly failed.


Make sure that items in the assembly you are trying to remove fulfill the following conditions:


1. Pipelines, maps, and schemas are not being used by Send Ports or Receive Locations


2. Roles have no enlisted parties.


 


The most common problem I see is what is required to redeploy an assembly.  To redeploy an assembly the flowing must be true:



  • project is marked with redeploy = true

  • dependant assemblies but be undeployed

  • included maps and pipelines can not still be set on a send or receive port

  • Orchestration instances must be terminated

  • Orchestrations must be stopped and unenlisted

  • hosts must be restarted to release the cache

As the number of Ports, Maps, Orchestation, and Pipelines in your solution increase, tracking down these errors and manually stopping and starting can be difficult and time consuming.



I have put together a simple Windows Application that will perform some of these basic administrative tasks to help speed up the development process.  These tasks include:



  • Set all pipeline to default and remove all maps from Send and Receive Ports (make sure you have extracted your current settings as a binding file before hand)

  • Stop all Orchestrations

  • Stop all Send and Receive Ports

  • Start all Orchestrations

  • Start all Send and Receive Ports

  • Restart all in-process hosts (uses WMI)


All this simple form does is it loops around the existing ExplorerOM and WMI provided in Biztalk. 



Download: Biztalk Server Development Helper Tool



Setup is easy.  Just review the code and run the form.  You must have the correct permissions to run the tasks and to access a remote SQL.  If you are using a remote SQL Server, put that server name inside the top right text box.  It will default to your local computer name.  As always, run this code at your own risk.



Biztalk 2006 greatly simplifies this process.  In the mean time, if you are looking for something more powerful take a look at Jon Flander’s Biztalk Snapshot Tool


 

Biztalk Development Helper Tool

This tool can help with development with Biztalk 2004. This tool will start and stop Orchestration, start and stop Send and Receive Port, remove pipelines and map from Send and Receive Port, and restart all in-process Biztalk Hosts. This tool is a great resource for any Biztalk developer. This should also work with BizTalk 2006.

Get more information from the original blog post on this topic: http://www.biztalkgurus.com/biztalk_server/biztalk_blogs/b/biztalk/archive/2005/09/07/biztalk-2004-development-helper-tool-_2d00_-a-must-have.aspx

Windows Workflow Webcasts

The world as we know it is about to change – for the better. 



To get ready for this exciting new offering Microsoft has announced a week of Workflow Webcasts to run the week of September 26th.



Webcasts include:




Anyone currently working with Biztalk and Workflows should make every effort to attend these webcasts or view them later via live play.



You can get all the details from Paul Andrew blog.


 


Make sure you check out the new Windows Workflow Foundation page of BizTalkGurus.com for samples and videos.


 

Using Dynamic Transforms (Mapping) in Biztalk 2004 Orchestrations

Dynamic mapping is the concept of specifying the map to be used for a transform at runtime inside the orchestration. That means no Transform Shape is used to specify the map or input and output schemas.



The help guide talks about dynamic mapping. It is under the heading “Assigning to Transforms Dynamically”. The help guide does not go into any detail as to when or why you would want to use dynamic mapping. In fact, the help guide makes the topic seems more complex then it really is.



Dynamic transforms can be used any time you have the same business process that needs to have the same or different message types sent into it but they need to have different maps based on some parameter.



Example: We are receiving a standard invoice from multiple locations for the same vendor. The schema is exactly the same but the mapping of the vendor data to the base schema (date formats, currency conversion, etc.) is slightly different based on the vendor location.



Why not map on the Receive Port? This is the most common solution to this type of scenario. This uses document normalization to transform all your messages into the same type before it hits your business process. This is a great solution but what about exceptions?



Exceptions in maps on the Receive Port can be hard to react to and even harder to orchestrate a retry or recovery process. That is when mapping inside an Orchestration and Dynamic Maps come into play.



Calling maps inside an Orchestration provide a mechanism for exception handling, reprocess, and error notification. Dynamic maps allow for greater flexibility by allowing countless maps to be called without a Transform Shape.



With dynamic maps, the map name can be stored inside an attribute in the message, read from the SSO, or read from some other custom component. Then, it is as simple as creating a System.Type with the strong fully qualified map name.



This would look something like this:


tMapType = System.Type.GetType(“DynamicMaps.Map_A, DynamicMaps, Version=1.0.0.0, Culture=neutral, PublicKeyToken=faed587cb93de4ea”);



construct Out_Xml


{


transform (Out_Xml) = tMapType(In_Xml);


}



If the map is inside the same assembly as the Orchestration, the full strong name is not needed. On that note, your maps usually are always inside a separate assembly…



It is important to point out this code needs to be inside an Expression Shape. The help guide says a Message Assignment shape. But, that will give a build error. If you want to use the code inside a Message Assignment shape just remove the Construct key word.



Sounds too good to be true? This does have one major drawback. If the message type of the input message does not match the message type expected in the map you get a blank message contracted. This can be seen in the sample below by running the RunMapType_ConstructBlank.xml message. So, it is import to check for this after the map.



I have put together a sample the shows dynamically calling maps inside an Orchestration both in the same assembly and inside another assembly.



Download: Dynamic Maps Inside an Orchestration



It is also common to see dynamic maps used with untyped messages (that is messages received as XmlDocuments).


Load Generation Tool For Testing BizTalk Server

A few days ago Microsoft released a Load Generation tool to help simulate load for testing Biztalk 2004 solutions.  You can download this testing tool here.



It seems that the installation package defaults the installation path for the testing tool to something other then your C drive.  In one case, my installation went to my E:\ drive and in the other two cases it went to my D:\ drive.  Just make sure during the installation you note (or change if you want to) the installation location.



Also, it appears that if you do not have MSMQ installed you will get an error saying MSMQTransmitter.dll did not register.  I said Ignore and it seemed to install correctly.  I tried this on the computer with MSMQ and did not have this problem.



I have not done anything more then install the program and briefly look at the documentation.  It seems quite powerful, but Larry Beck’s tool is much simpler and I didn’t have any problems installing it.


 


Thanks to Bryan Corazza for the release information.