Thursday, December 18, 2008

Biztalk Performance tunning blog on MSDN

There is a useful blog about Biztalk performance tunning on MSDN:
Biztalk Performance

Friday, December 5, 2008

Defining new filenames for send handler

How to create more ellaborated filename?


Following the list of predefined file names given on my previous post, how can you get more than what Biztalk gives you?

Solution:


You can change the SourceFileName. In the construct message block of the orchestration use something like the following:

Message_2 = Message_1;
Message_2(FILE.ReceivedFileName) = "your_value"+ToString(Message_1.id);

And then when you are defining the send port use File Name as usually: %SourceFileName%

List of variables for naming files at in send handler


How to change file name


This isn't a trouble, but a useful information that should be on every biztalk programmer manual.

The name of the file generated, mainly for archiving porposes, sometimes should be more than a GUId. This is a complete list of all the variables that can be used at the send handler. This is only valid for writing files, and some of them are only available when the input comes from a file also.


Macro nameSubstitute value
%datetime%Coordinated Universal Time (UTC) date time in the format YYYY-MM-DDThhmmss (for example, 1997-07-12T103508).
%datetime_bts2000%UTC date time in the format YYYYMMDDhhmmsss, where sss means seconds and milliseconds (for example, 199707121035234 means 1997/07/12, 10:35:23 and 400 milliseconds).
%datetime.tz%Local date time plus time zone from GMT in the format YYYY-MM-DDThhmmssTZD, (for example, 1997-07-12T103508+800).
%DestinationParty%Name of the destination party. The value comes from message the context property BTS.DestinationParty.
%DestinationPartyID%Identifier of the destination party (GUID). The value comes from the message context property BTS.DestinationPartyID.
%DestinationPartyQualifier%Qualifier of the destination party. The value comes from the message context property BTS.DestinationPartyQualifier.
%MessageID%Globally unique identifier (GUID) of the message in BizTalk Server. The value comes directly from the message context property BTS.MessageID.
%SourceFileName%Name of the file from where the File adapter read the message. The file name includes extension and excludes the file path, for example, foo.xml. When substituting this property, the File adapter extracts the file name from the absolute file path stored in the FILE.ReceivedFileName context property. If the context property does not have a value, for example, if message was received on an adapter other than File adapter, then the macro will not be substituted and will remain in the file name as is (for example, C:\Drop\%SourceFileName%).
%SourceParty%Name of the source party from which the File adapter received the message.
%SourcePartyID%Identifier of the source party (GUID). The value comes from the message context property BTS.SourcePartyID.
%SourcePartyQualifier%Qualifier of the source party from which the File adapter received the message.
%time%UTC time in the format hhmmss.
%time.tz%Local time plus time zone from GMT in the format hhmmssTZD (for example, 124525+530).

Thursday, December 4, 2008

Enlisting in transaction coordinator

New transaction cannot enlist in the specified transaction coordinator


This has to be made when Biztalk is installed and when a new Windows SP is installed in the server. By default and when installing Service Packs in Windows, some security rules are activated.

Those rules also affect MSDTC - Microsoft Distributed Transaction Coordenador. As the name indicates, it is responsible for coordinating transactions that span multiple resource managers, such as databases, message queues, and file systems. Basically what Biztalk wants.


Solution:
Easy setup on My Computer. Read all at MSDN


Sunday, November 16, 2008

Ports and correlations

You must specify at least one already-initialized correlation set for a non-activation receive that is on a non-selfcorrelating port.


There is not a better error to start whin than this wonderful classic. This error happens to everyone all the time. When you start making an orchestration you may be thinking of this, but it will vanish from your mind before the first component is set.

Solution:

The beggining of the orchestration - usually a Receive component - must have the property Activate as True. Why isn't this a default in Biztalk? Good question...

Wednesday, November 5, 2008

A blog is born

Hello world! This blog intends to be a compilation of the troubles I had along my interaction with Biztalk. Some of the errors are easily solvable, some others took me days to understand. The solution can be as simple as the activation of a checkbutton or as tricky as to restart the project from scratch.

This blog will be mainly about Biztalk 2006R2 but also previous versions will be occasionally analysed.
All comments are welcome and new solutions are appreciated. For the first days I'll list some of my "favourite" headaches.