Probably every demo of BizTalk 2004 you'll see uses a Send File Port that sends messages to a directory and most of the time these files will have a GUID as a filename, so each message sent will have a different name. The solution is to use "MessageID" macro in the URI property of the Sender Port. So the URI property could look like “c:\temp\out\%MessageID%.xml“. Everything between the percentage signs (including themselves) will be replaced by the GUID which is of course unique.
The files in which the files send handler writes messages can be created dynamically using a predefined set of macros. Before creating a file on file system, the files send handler substitutes all the macros in file name with their individual values. Several different macros can be used in one file name. The file name macros can be used while configuring the file send handler in BizTalk Explorer, or using the Explorer object model.
Below are the list of Macros that could be used for file send ports to generate meaningful names, rather than just a GUID.
%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. %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).
3 comments:
Amiable brief and this mail helped me alot in my college assignement. Thanks you seeking your information.
Sorry for my bad english. Thank you so much for your good post. Your post helped me in my college assignment, If you can provide me more details please email me.
Hello Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic. If possible, as you gain expertise, would you mind updating your blog with more information? It is extremely helpful for me.
Post a Comment