Wednesday, June 29, 2011

BizTalk : Issue with Blogical SFTP adapter in load balancing environment

We have used Blogical SFTP adapter in one of our application, it works absolutely fine in dev environment, so we have moved to test environment which is load balancing env with 2 nodes.

Initially we started testing with messages of very less size, everything went well and load balancing env works as expected.

Slowly we have started increasing load(i.e of messages), then starts genaration of duplicates messages in the output.

We analysed that is problem, and what we got to know is SFTP adapter works in load balancing environment as long as message gets processed with in <10 minutes of time.

If message takes >10 min of time, second nod will pick up the processing, hence there will be duplicates in the  output.

On futher anlysis of BLogical SFTP code, code that is causing prob is below:
if( (select count(*)
from [dbo].[SftpWorkingProcess]
where [URI] = '{0}'
and [FileName] ='{2}'
and datediff(minute, [Timestamp], getdate()) <10) = 0)
begin
INSERT INTO [dbo].[SftpWorkingProcess]
           ([URI]
           ,[Node]
           ,[FileName])
     VALUES
           ('{0}','{1}','{2}')

select 1 as WorkInProcess
end
else
select 0 as WorkInProcess


Conclusion:
We created seperate host instances for SFTP adapter, made them work under active-passive mode, so only one node will process the messages.
If Active host instance is down for some reason, manually need to turn other one ON and STOP the other.

If you need Blogical SFTP adapter to work in load balancign env, then you have to tweak the Blogical SFTP code to increase time from 10 minutes or make some design changes on how itworks

Views or activities may be missing because one or more databases could not be contracted

Recently we faced a problem with BAM views not loading in BAM potal.

We have followign error showing up in BAM Portal "Views or activities may be missing because one or more databases could not be contracted".

When we analysed further, there is following error in event log :
Referenced database 'BAMPrimaryImport' on server ‘Machine Name' is not accessible. The error is:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.BizTalk.Bam.WebServices.AsyncResult.End(AsyncResult asyncResult)
   at Microsoft.BizTalk.Bam.WebServices.Management.GetViewSummaryAsyncResult.End(IAsyncResult result)
   at Microsoft.BizTalk.Bam.WebServices.Management.BamManagementService.GetViewSummaryForCurrentUser()

Solution:

BizTalk BAM having some bug, if expired user account has some BAM activity view permission, then BAM view s won't not be loaded in BAM portal.

Gone through all accounts permissions those are given to all BAM views in bam prim db.

Finally, found one account which is no longer present in active directory or expired.

On removing permission for  that user account to BAM view, issue got solved automatically
- Best of luck..

Friday, June 24, 2011

Blogical SFTP adapter Notification Messge Issue

We have requirement to "send an mail alert to partner"  on not receiving message from partner at particular time (say between 5:00 AM to 5:05 AM).

We got to know Blogical SFTP adapter already have this feature (i.e it will send notification message on not receiving messge at particular point of time), so we did some anlysis around this.

Analysis Conclusion:

SFTP notification feature wont work in load balancing environment,  i.e instead of sending one notification  message, adapter will trigger 2 notification  messages (if there 2 Biztalk nodes, i.e 1 from each nod) which results in sending 2 notification alerts to partner instead of one.

Biztalk : Usage of custom SSO Applications


Using SSO application in BizTalk application configuration will have lot of advantages.
1.Security - Administator can create and configure SSO application for you, so developer can use SSO application name to authenticate i.e no need to of  providing user name and passoword in the ports.
2.Can be used across all applications
3.Maintanence point of view, this is the best option because changing user id and password at one place will effect all applications running on the machine.

There are 2 simple steps to acheive this:
1. create SSO application
 ssomanage –createapps TestApp.xml
2.Enable SSO applications
ssomanage –enableapp  TestApp
3.Configure BizTalk applications

Business Activity Monitoring in BizTalk

Business can take advantage of using BAM on leveraging BizTalk server for integrations.

BizTalk ships with BAM feature,  so can business leverage this feature for tracking the data at important milestones, can know trends in business based on the data that is being tracked.

To implement BAM,  business analyst should identify requirements and have to come with fields and other data need to tracked.

Also BA will play important role in defining the BAM views.

For Creation of BAM Activities and Views, Analyst will use BAM Excel feature.

On successful creation of  activities and its views, developers will leverage activities those are created by analyst for further development.

To Track data, BizTalk dev. will leverage either BAM API or will configure BAM tracking profiles

If dev. Use BAM tracking  profiles for tracking, then no need to write any code, simple tracking profile configuration will be enough.

If you want to track data changes that message undergoes,  you have to leverage BAM API.


BAM API can be implemented using any of the below streams:

MES : Pipeline Event Stream
BES : Buffer Event Stream
OES : Orch. Event Stream
DES : Direct Event Stream

DES and BES can be leveraged even in Non- BizTalk Applications.
OES and MES : Can be used only in BizTalk applications.


DES will have very less latency, as it tracks data directly into BAM primary import database. For latency to be  very less, use DES.

If you are coding against pipeline, use MES
If you are coding against orch., use OES

Dev. should use stream based on the component where they are coding, it will have impact on performance.





BizTalk Performance Counters

In the BizTalk Projects, performance testing is very important.

Will discuss performance counters to be monitored in detail: