Properties are not promoted after debatching/envelope processing

I recently stumbled into a problem with property promotion. I used the DB2 adapter to get multiple records from a table, and then used envelope processing to split the message into several with one record per message. An example envelope looked like this:
 
<PurchaseOrderHeaderEnvelope_LCD xmlns="urn:Coop.THA.PurchaseOrders">
  <T_EX_ORDER_HUV LC_ID="505" DEPA_ID="1" EX_ORDER_NR="800000" … />
  <T_EX_ORDER_HUV LC_ID="505" DEPA_ID="1" EX_ORDER_NR="800001" … />
  <T_EX_ORDER_HUV LC_ID="505" DEPA_ID="1" EX_ORDER_NR="800002" … />
</PurchaseOrderHeaderEnvelope_LCD>
 
And after split, there were three messages like this:
 
<T_EX_ORDER_HUV LC_ID="505" DEPA_ID="1" EX_ORDER_NR="800000" … />
I had promoted some attributes in this schema, e.g. LC_ID, but the problem was that they were never promoted to the incoming message. After searching the web for a while, I found others had this problem too. It seems to be a bug in the XML disassembler component. There were three suggested solutions:
 
1. Install a hotfix described in http://support.microsoft.com/kb/927741. That would not install on my system – maybe because I’m using BizTalk 2006 R2, and the hotfix was for BizTalk 2006?
 
2. Change the message structure to use start and end tags. In my case:
 
<PurchaseOrderHeaderEnvelope_LCD xmlns="urn:Coop.THA.PurchaseOrders">
  <T_EX_ORDER_HUV LC_ID="505" DEPA_ID="1" EX_ORDER_NR="800000" … ></T_EX_ORDER_HUV>
  <T_EX_ORDER_HUV LC_ID="505" DEPA_ID="1" EX_ORDER_NR="800001" … ></T_EX_ORDER_HUV>
  <T_EX_ORDER_HUV LC_ID="505" DEPA_ID="1" EX_ORDER_NR="800002" … ></T_EX_ORDER_HUV>
</PurchaseOrderHeaderEnvelope_LCD>
 
I could not do that, because the message is generated by the DB2 adapter.
 
3. If using the SQL adapter, you can the ELEMENTS option in the FOR XML clause. You will get the columns as elements rather than as attributes. Again, I was using the DB2 adapter, so I could not do that.
 
I thought for a while and came up with an idea. Since you can have a map in the receive port, properties in the destination schema must be promoted after the mapping. I tried to create a dummy mapping with the document schema as both source and target and use that in the receive port. It worked!
Advertisements

ESB Add Namespace component: registry access is not allowed

I recently installed Microsoft ESB Guidance for BizTalk Server 2006 R2, because I needed a pipeline that could add a namespace to an XML document without namespace. When I tested it, I got the following error:
 
There was a failure executing the receive pipeline: "Coop.THA.ReceiptConfInventoryAdj.Rcv_ReceiptConfIntentoryAdj, Coop.THA.ReceiptConfInventoryAdj, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ef93fd4cc292df2" Source: "ESB Add Namespace" Receive Port: "TestReceiptConfInventoryAdj" URI: "C:CoopTHATestReceiptConfInventoryAdjIn*.xml" Reason: Requested registry access is not allowed.
A web search soon revealed that the pipeline component was trying to create a new event source in the application log, but was not allowed to do so. Natural, since BizTalk is running using a non-admin user.
 
My solution was to, using regedit.exe, assign full control on HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesEventlogApplication to the BizTalk service user and rerun my test. On examining the registry after that, I found that the "Sources" value had been altered to include Microsoft.Practices.ESB on the first line. There was also a new subkey with the same name.

Microsoft BizTalk 2006 R2 Installation Quick Summary

I know there are official installation guides for BizTalk, but I have tried to summarize the various sources of information I usually need when helping customers with production installations in a multiple computer environment, usually with a two-node SQL cluster and a two-node BizTalk cluster or two standalone BizTalk nodes. The document can be found at Windows Live Skydrive: http://cid-91d78390ece48c0d.skydrive.live.com/browse.aspx/Offentlig