Wednesday, January 24, 2007

Another Successful Implementation

Months of hard work finally helped us execute another successful BizTalk Implementation this week. This was the reason that I was not able to Blog for past few months. I spent past 3 months managing and organizing the activities for the BIG implementation. It was a great team work and everything fell in place. Hours and Hours of work finally paid. Impact of implementation can be understood from the fact that entire system was off line for the users for almost a week! There were about 5 cross functional teams with about 100 people working on this Big Implementation. World wide offices were under the impact. Biztalk was a major part of the complete implementation if not the entire implementation. Every thing has to be timed to perfection between all the teams to get flawless implementation.

I also want to share a piece of code that I created as a workaround for existing process in place. With the recent implementation the transaction volume is projected to increase FOUR folds both in frequency and size. The present implementation is very database centric as all the business validations are run through queries in Oracle. This leads to instance of “connection pool time out” issues. Even though the code is optimized, this issue is something that we have not been able to completely eliminate. There are definitely some ideas architecture wise that can help. But we neither have budget nor time to implement them. So the workaround for that is to control or throttle the number of transactions passing through Biztalk. Since we can’t tell users not to send files in multiple batches, one thing we can do is to control the execution from our end.

The Plan:

1) Create a common folder that will receive the files
2) Create a way to copy the files from this folder to biztalk pick up locations and then delete the files. The following code is the core of the solution that will do the job.
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim fileNameCollection() As String
Dim totalFiles As Collection

Dim ActualFilename As String
Dim LastIndex As Integer

Dim SetFolder As System.IO.Directory

fileNameCollection = SetFolder.GetFiles("C:\FileMover\") ' set source folder
Dim i As Integer
For i = 0 To fileNameCollection.Length - 1
LastIndex = fileNameCollection(i).LastIndexOf("\")
ActualFilename = fileNameCollection(i).Substring(LastIndex + 1)
System.Threading.Thread.Sleep(10000) (May not be required when used as scheduled job)

System.IO.File.Copy(fileNameCollection(i), "C:\FileMover\Archive\" + ActualFilename, True)



End Try

End Sub


This code will be further made database configurable using SQL database. The variables being “Folder Locations”, “Number of files to be dropped” and “Time Interval” between each file.

Another possible use of this application can be during stress testing. Instead of manually dropping the file, this application can drop them automatically after all the parameters are configured. So switch on the performance indicator and go home! When you come back all the test statistics will be written in the file.

No comments: