Tuesday, June 5, 2012

Convert / Migrate BizTalk 2002 Maps

Convert BizTalk 2002 Maps to new versions of BizTalk.

Tested in BizTalk 2006R2, 2009 and 2010

  1. Firstly the BizTalk 2002 map is in XML format.
  2. Copy the map xml file and then rename that to .btm (this is the extension of the map file in new BizTalk versions)
  3. Create a new BizTalk Project in Visual Studio of new BizTalk version environment
  4. In Solution Explorer, right click on the project and select “Add Existing Item”
  5. Add the renamed file in step # 2
  6. After the {file}.btm appears in Solution Explorer, you can simply double click to open the map.
  7. This action created the Source (_src) and Target (_trg) schemas and a map is now migrated to the new version.
  8. After migration, you will have to change a few things from traditional VB Script to VB .NET and possibly remove custom functoids if any and replace with something more out of box

** Remember not to judge the mapping. After all it is a historical artifact J and people did their best to use the tool with limited knowledgebase compared to present times.
(And no Google/Bing to rescue)

Also, if you are reading this and have to do this migration task at present time (Year 2012) there is someone else trying to save their sweet spot job and know nothing beyond BizTalk 2002? Watch Out and good luck with politics!
 
Enjoy! Hope this is still useful to someone!

Created by: Amit Kumar
contact: technoamit@gmail.com
web-site: http://quicksolutionsinc.us/

Monday, June 4, 2012

WCF Adapter Action Issue

Issue with WCF.Action or other WCF properties at Run-Time

I am postign this article for a very specific purpose. After I posted the topic on dynamically setting the WCF Action for the Custom WCF Adapter based Send Port, some folks running BizTalk 2009 or older reported that they faced the following issue:

1. Even though the WCF.Action property is promoted, at run time the Adapter fails to read the promoted property from the message context. They get an error message stating the Action is not in the specified Action. Look at the screen shot below.

Error when WCF.Action is not passed or read by the WCF Adapter


Error Description from event Log:
The adapter failed to transmit message going to send port "Send_to_SAP_Generic_ODX" with URL "sap://CLIENT=100;LANG=EN;@a/SERVERNAME/99?&RfcSdkTrace=False&AbapDebug=False". It will be retransmitted after the retry interval specified for this Send Port. Details:"Microsoft.ServiceModel.Channels.Common.UnsupportedOperationException: Incorrect Action <BtsActionMapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Operation Name="SendToSAP" Action="" />
</BtsActionMapping>. Correct the specified Action, or refer to the documentation on the allowed formats for the Actions. Note that Actions are case-sensitive.

Before I dive into the possible solutions, let me share what I learnt while troubleshooting this issue. First I was able to reproduce it by starting with a vanilla (run-time) only BizTalk 2009 Environment with NO Visual Studio (actually Visual Studio presence is really irrelevant), but nevertheless.

Ø      Solution(s):

o        Download and install the Cumulative Update 5 or 6 for BizTalk Server 2009, 2006 R2 (remember WCF adapter stuff does not apply to BizTalk versions prior to R2 release)

Cumulative Update 5


Cumulative Update 6


    • Recommended Fix for Production or QA environment:
Although the best practice states that install the latest updates instead of the following short-cut. However read on…

  1. Now the cumulative update installation might warrant an outage. So, if a temporary fix is required for critical run-time environments, it will probably make sense to fix the problem at hand only. This also applies to situations where there are complex integration services hosted on BizTalk and a planned outage is required and waiting for a longer time to get the Cumulative Updates is inevitable.
  2. In that case, the culprit dll is Microsoft.BizTalk.Adapter.Wcf.Runtime.dll
  3. Get the newer Microsoft.BizTalk.Adapter.Wcf.Runtime.dll from the dev environment where Cumulative Patch is applied and install to GAC on the target computer

Gacutil –if “{path\ Microsoft.BizTalk.Adapter.Wcf.Runtime.dll}    à New dll

  1. No need to restart host instances
  2. Also, you can resume the suspended instances they should read the property and move on!

Created by: Amit Kumar
contact: technoamit@gmail.com
web-site: http://quicksolutionsinc.us/