Modifying File Names in BizTalk Send Adapters

There are times you’ll want to control the name of a message as it’s saved to disk (default is GUID).  The question arose if promoted properties were allowed; a link to this is presented below the bullets.  Thanks to Todd Uhl for providing this.

  • %datetime_bts2000%: UTC date time in format YYYYMMDDhhmmsss, where sss means seconds and milliseconds (e.g. 199707121035234 means 1997/07/12, 10:35:23 and 400 milliseconds)
  • %datetime%: UTC date time in format YYYY-MM-DDThhmmss (e.g. 1997-07-12T103508)
  • %datetime.tz%: Local date time + time zone from GMT in format YYYY-MM-DDThhmmssTZD, (e.g. 1997-07-12T103508+800)
  • %time%: UTC time in format hhmmss
  • %time.tz%: Local time + time zone from GMT in format hhmmssTZD (e.g. 124525+530)%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
  • %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.

The following link points to a blog presenting two ways to use a promoted property as a file name: http://geekswithblogs.net/sthomas/archive/2004/11/13/14949.aspx

About Michael Coates
I am a pragmatic evangelist. The products, services and solutions I write about fulfill real-world expectations and use cases. I stay up-to-date on real products I use and review, and share my thoughts here. I apply the same lens when designing an architecture, product or when writing papers. I am always looking for ways that technology can create or enhance a business opportunity .. not just technology for technology's sake. My CV says: Seasoned technology executive, leveraging years of experience with enterprise and integration architectural patterns, executed with healthy doses of business acumen and pragmatism. That's me. My web site says: Technology innovations provide a myriad of opportunities for businesses. That said, having the "latest and greatest" for its own sake isn't always a recipe for success. Business successes gained through exploiting innovation relies on analysis of how the new features will enhance your business followed by effective implementation. Goals vary far and wide: streamlining operations, improving customer experience, extending brand, and many more. In all cases, you must identify and collect the metrics you can apply to measure your success. Analysis must be holistic and balanced: business and operational needs must be considered when capitalizing on a new technology asset or opportunity.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: