Biztalk Server 2006 Database Engine

Biztalk Server 2006 Database Engine

Just came back from Microsoft today for a partner event on BPI, integration with Biztalk Server 2006 and other 2006 DotNet Servers. Good event, glad they clarified that the backend for sql server databases will be tied in with Yukon engine and not Shiloh engine. My current CTP install of Biztalk Server 2006 is still integrated with Shiloh and I was getting concerned about this so had to cllarify. Glad they also showed how BAM can add intangible business value to systems integration via real time data analysis, that other vendors just seem to ignore, which gives Biztalk that extra edge in the ZLE arena. They gave a great BAM case study for fraud detection which I will most certainly leverage for my presales activities!

"I cannot access the MSMQC adapter properties in an orchestration" issue

Recently, somebody asked me how to access the MSMQ label from BizTalk, in order to access some information that is passed by its own C# application through the MSMQ label.
See issue described below.
———————————-
Below I give my problem, Please give me a good solution for me.
I have a C# application. It has an upload page. If user uploads a XML file,the C# application reads it and send this to MSMQ as a Message.
The code is below.


StreamReader sr = new StreamReader(Path); string str; str = sr.ReadToEnd(); System.Messaging.Message mm = new System.Messaging.Message(); mm.Formatter = new ActiveXMessageFormatter(); mm.Body = str.ToString(); mm.Label = UserID; mq.Send(mm);


I create a Orchestration with receive and send ports. The receive ports looks message from the MSMQ using MSMQ adapter. then I use schemas and maps to transfer the Message. After that, I use a file adapter for save the final message to a folder.


Every thing works fine. My problem is, I want to identify the User who uploads the file. In C# application I set the label for the message as USERID.


I want to save the name of the output file is [userid].xml.


I use %SourceFileName% and MsgOut(FILE.ReceivedFileName) to rename the output file. But how to get the userid from the C# application and set the file name. I cant able to access MSMQT.Label in Expression Editor. Because I use MSMQ adapter. Please give me a good solution.


The main problem is identify the user who uploads the file.
———————————-
The problem with the existing implementation of MSMQC lies in the MSMQPropertySchema.xsd file that seems to be incorrect.
This XSD schema must be updated so that the properties are marked as context properties. To do this, select each property and change the “Property Schema Base” property from default value (no value) to MessageContextPropertyBase. Once you do this, re-build and re-deploy the updated schema project, and you should be able to access these properties from your orchestration.
This is how the schema should look like


<?xml version=”1.0″ encoding=”utf-16″?>
<xs:schema xmlns=”http://schemas.microsoft.com/BizTalk/2003/msmqc-properties” xmlns:b=”http://schemas.microsoft.com/BizTalk/2003″ targetNamespace=”http://schemas.microsoft.com/BizTalk/2003/msmqc-properties” xmlns:xs=”http://www.w3.org/2001/XMLSchema“>
  <xs:annotation>
    <xs:appinfo>
      <b:schemaInfo schema_type=”property” xmlns:b=”http://schemas.microsoft.com/BizTalk/2003″ />
    </xs:appinfo>
  </xs:annotation>
  <xs:element name=”AppSpecific” type=”xs:int”>
    <xs:annotation>
      <xs:appinfo>
        <b:fieldInfo propertyGuid=”ec76abf6-1c10-4383-8182-635eaf20a790″ propSchFieldBase=”MessageContextPropertyBase” />
      </xs:appinfo>
    </xs:annotation>
  </xs:element>
  <xs:element name=”ArrivedTime” type=”xs:dateTime”>
    <xs:annotation>
      <xs:appinfo>
        <b:fieldInfo propertyGuid=”3d8ae2da-2f26-4422-a68a-67f005cf32c8″ propSchFieldBase=”MessageContextPropertyBase” />
      </xs:appinfo>
    </xs:annotation>
  </xs:element>
  <xs:element name=”Authenticated” type=”xs:boolean”>
    <xs:annotation>
      <xs:appinfo>
        <b:fieldInfo propertyGuid=”36e29190-e4cc-4e64-b181-4a63488ccd75″ propSchFieldBase=”MessageContextPropertyBase” />
      </xs:appinfo>
    </xs:annotation>
  </xs:element>
  <xs:element name=”CorrelationId” type=”xs:string”>
    <xs:annotation>
      <xs:appinfo>
        <b:fieldInfo propertyGuid=”d16e9d65-f742-4982-9c71-59089fa23b22″ propSchFieldBase=”MessageContextPropertyBase” />
      </xs:appinfo>
    </xs:annotation>
  </xs:element>
  <xs:element name=”Id” type=”xs:string”>
    <xs:annotation>
      <xs:appinfo>
        <b:fieldInfo propertyGuid=”c0e64a4d-8a6f-4b21-936c-5531abb255f4″ propSchFieldBase=”MessageContextPropertyBase” />
      </xs:appinfo>
    </xs:annotation>
  </xs:element>
  <xs:element name=”Label” type=”xs:string”>
    <xs:annotation>
      <xs:appinfo>
        <b:fieldInfo propertyGuid=”1ff2b7af-2dd8-4b38-8360-2373e5fb05f6″ propSchFieldBase=”MessageContextPropertyBase” />
      </xs:appinfo>
    </xs:annotation>
  </xs:element>
  <xs:element name=”Priority” type=”xs:int”>
    <xs:annotation>
      <xs:appinfo>
        <b:fieldInfo propertyGuid=”7f13d6b8-21c6-4914-9025-b91dc03c0b24″ propSchFieldBase=”MessageContextPropertyBase” />
      </xs:appinfo>
    </xs:annotation>
  </xs:element>
  <xs:element name=”ResponseQueue” type=”xs:string”>
    <xs:annotation>
      <xs:appinfo>
        <b:fieldInfo propertyGuid=”8cf607f9-165e-43c8-b730-07559d876b5c” propSchFieldBase=”MessageContextPropertyBase” />
      </xs:appinfo>
    </xs:annotation>
  </xs:element>
  <xs:element name=”SentTime” type=”xs:dateTime”>
    <xs:annotation>
      <xs:appinfo>
        <b:fieldInfo propertyGuid=”603ffea4-4fd9-443c-9362-b662b8aacddb” propSchFieldBase=”MessageContextPropertyBase” />
      </xs:appinfo>
    </xs:annotation>
  </xs:element>
  <xs:element name=”SourceMachine” type=”xs:string”>
    <xs:annotation>
      <xs:appinfo>
        <b:fieldInfo propertyGuid=”32fbdf7b-d19f-4e27-9b45-331810780eef” propSchFieldBase=”MessageContextPropertyBase” />
      </xs:appinfo>
    </xs:annotation>
  </xs:element>
</xs:schema>

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: https://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.


 

Where does WSE 2.0 fit into BizTalk 2004?

Over the next few posts, I’m going to explore where, and
how, WSE 2.0 fits in with BizTalk 2004.  I know some of you are thinking,
well, we have this wonderful WSE adapter that allows us to retreive SOAP
messages and have all the (or at least some) of the benefits of WSE
(WS-Addressing, WS-Policy, etc).  That’s true, we do…  BUT, what happens if we want to receive
messages over a transport other than HTTP?  Many times, in a SOA
environment it is necessary to support guaranteed delivery.  This is not
possible over HTTP.  WSE gives us the ability to define our own custom
transports.  Therefore, from a WSE standpoint we could receive messages via
MQ to support our guaranteed delivery requirement.  If we do that then we
can’t use the WSE adapter.

On my current project, I’m exploring ways of
dealing with WSE compliant messages, without using the WSE adapter.  This
of course will require development of a custom pipeline to deal with some of the
things the adapter takes care of like handling the WS-Addressing headers,
digital certificates, etc.  Another thing I’m exploring is implementing WSE
pipelines inside of a BizTalk pipeline.  This allows you to add custom
filters to the WSE pipeline through configuration…pretty powerful.  I’m
not sure what the implications, if any, are however.

Stay tuned as I post my findings!!

Cheers,

Todd

A PST for the PDC…

Unfortunately, I won’t be able to make it to the PDC this year…However, a good colleague
by the name of Jordan Terrell has put together this great
PST file for the PDC with all the sessions as calendar appointments. (Open as
a data file in Outlook, and in the Calendar view, you will be able to select a calendar
corresponding to each of the conference tracks.)

A PST for the PDC…

Unfortunately, I won’t be able to make it to the PDC this year…However, a good colleague
by the name of Jordan Terrell has put together this great
PST file for the PDC with all the sessions as calendar appointments. (Open as
a data file in Outlook, and in the Calendar view, you will be able to select a calendar
corresponding to each of the conference tracks.)