Showing posts with label BizTalk. Show all posts
Showing posts with label BizTalk. Show all posts

Tuesday, July 24, 2012

Gotcha: BAM API Anomaly

Scenario:
A helper class is created to log activities using BufferedEventStream class available with BAM API. We created an instance of this helper class in orchestrations and called various methods from the helper class to  ActivityStart, Error, EndActivity, ActivityUpdate etc.

Issue:
We observed that, some of the entries we logged using UpdateActivity method are randomly not stored into BAMPrimaryImport database(thus not showing up on BAM Portal). We also observed that, UpdateActivity call prior to EndActivity call seems to be having this issue more often.

Fix:
In each BAM API call in the helper class, we are creating new BufferedEventStream object. Since BufferedEventStream is asynchronous in nature and we are creating separate instances of these, I suspected that there could be random cases where UpdateActivity calls might be logged after EndActivity calls. I read from the documentation that, EndActivity should be the last method to be called. So we then created an instance varible of type BufferedEventStream and used it in all calls rather than creating separate instance of it in every method. After doing this, we did not find any issues with activity entries on BAM portal.

We have spent quite a bit of time to troubleshoot this issue with few other alternatives until we finally figured out the fix. I hope this post helps and saves time, if any one else finds similar issues.

Monday, December 12, 2011

Gotcha: Initial Value property of BizTalk orchestration integer variable

Define a variable in an orchestration and choose type as int32. We can see that value property is blank and we can tab out from property window. But if we specify some default value for Initial Value property , tab out, go back and try to delete it , we get a popup window with error as "Property value is not valid.".
To me , this looks like a bug in editor (unless I miss something here!!!).

Here is quick workaround to be able to assign blank value to an already assigned  integer variable,
Change type from int32(System.Int32) to char and again change it back to int32. Now we can see that, Initial Value property has blank value and we can tab out from the window with no errors.

HTH.

Saturday, December 10, 2011

Gotcha: BizTalk Map

Did you ever find that, simply mapping link from source schema node to target schema node in BizTalk map doesnt stick as you intended to the mapping surface, but everything else seems to look fine?

Here is something to check out, see if value property on target schema node is set to some default value.If there is any value set, then we would not be able to map to that node until we clear out that value.

Although this looks like a simple check, it could very well take quite a bit of troubleshooting time if not realized soon enough.

HTH.

Monday, May 2, 2011

Gotcha: BizTalk HTTP adapter on IIS 7.0 and above

Recently I needed to set up HTTP receive adapter(BizTalk 2009) on my Windows 7 development machine which has IIS 7.0. Source system is going to send a simple date value through query string parameter of HTTP site URL (like http://server/AppName/BTSHTTPReceive.dll?MyDate=datevalue). I followed instructions stated here on MSDN documentation and tested the set up by pointing to the site URL in a browser window(IE9). But I did not get the response as expected and observed some popup windows on my browser.

After closely looking at different steps explained in the link mentioned below, I realized that my request is really not POST, but GET . So I needed to input GET verb as well in step 8 of instructions for IIS 7.0 section. After making this change, I got the response that expected in the browser.

HTH.

Monday, November 8, 2010

Tip: Specifying Key file path for BizTalk projects

As we know, key file needs to be specified for any BizTalk project in order for assembly to have strong name before GAC/deploy the same. We could specify this key file either through project properties or in AssemblyInfo.cs file. We can conveniently specify the path to key file if we choose the later. But if we specify the path to key file using Project Properties window, I observed that a copy of key file is being created in respective project folder and same is being referenced. But there may be times where we might want to specify key file from a different location to avoid multiple copies of key file. Here are couple of such scenarios,

1. When we like to maintain key file at some common location(like at root level) and share the same across multiple BizTalk projects/solutions

2. When we migrate BizTalk solutions from previous versions, they might contain the path to key file. If we need to change this through browse option, we get local copy of key file and lose the ability to choose different location.

Here is a manual work around to specify key file path at BizTalk project level,

Open BizTalk project in some text editor (like Notepad), and we can observe the following section in that,

For BizTalk Server 2010 project:
< PropertyGroup >
<SignAssembly > true/false</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile><path to key file here></AssemblyOriginatorKeyFile>
</PropertyGroup>

For BizTalk Server 2009 project:

<PropertyGroup >
<AssemblyOriginatorKeyFile><path to key file here></AssemblyOriginatorKeyFile>
<SignAssembly > true/false</SignAssembly>
</PropertyGroup>

Specify key file path in the AssemblyOriginatorKeyFile node and save the file. Now we can see the same path in Properties window as well.