BizTalk SendPort Macros

Today I needed to get an onverview of what macros that are available out-of-the-box wend sending a message to a filebased destination. These should work for FILE and FTP adapter.



  • %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)


 All these properties are in the message context and may be changed when createing a message in an orchestration like this for SourceFileName.

I have created a new message called myNewMessasge in a MessageAssignment shape like this:
 myNewMessage = myOldMessage, 
coying the context : myNewMessage(*) = myOldMessage(*) 
and setting the new fileName : myNewMessage(FILE.ReceivedFielName) = myNewFilename.xml

Comments

Popular posts from this blog

Illegal 'activate' predecate

BizTalk Host "Stop Pending"

The Messaging Engine failed to register an adapter "WCF-BasicHttp". Details: "Registering multiple adapter types within the same process is not a supported configuration. For e.g. HTTP and SOAP receive adapters cannot co-exist in the same process