Sep 192006
 

I am tired of constantly having to look up what the macros are for BizTalk

Macro
Definition
%datetime%
Coordinated Universal Time (UTC) date time in the format YYYY-MM-DDThhmmss (for example, viagra 40mg 1997-07-12T103508).
%datetime_bts2000%
UTC date time in the format YYYYMMDDhhmmsss, look 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 the message context property BTS.DestinationParty.
%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 the extension and excludes the file path, for example, Sample.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 a message was received on an adapter other than the File adapter, 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.
%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).
Sep 192006
 

This also can work for multiple outputs to BizTalk Map also.

A recent post was asked how to take multipe messages and merge them into an output message structure. This actually puzzed me while I was learning the way BizTalk worked. Here is a simple example of how it works, sildenafil and how to implement it…

  1. The first thing this orchestration does is start off by consuming a trigger message.
  2. It then constructs the calls to the two stored procedures
  3. Then it calls the stored procedures and gets the responses from the stored procedures.
  4. It then takes the two responses and invokes the map. Here is the picture of the input arguments to the map:
  5. This is what the map looks like after you create the map with the multiple inputs:
  6. It then creates the file an sends the resulting file out.
  7. Here is the complete view of the orchestration:

Setup Instructions:

  1. Extract this file
  2. In the Properties of the project point to a strong named key file and set the BizTalkMgmtDB to your server
  3. Run the included sql script against the Northwind database to create the stored procedures
  4. Deploy the project
  5. create 4 ports
    • One input using Default XML pipeline and pointing to ..MultipleInputInput directory
    • Two Static Solicit/Response ports pointing to the Nortwind database and setting the Document Target Namespace to be http://storedprocx/ (X being the number of the stored proc), hospital  setting default xml as both the Send and Receive pipelines
    • One send port, medicine setting the default xml pipline and pointing to the ..MultipleInputOutput directory
  6. Bind the logical ports to the physical ports created in step 5
  7. Start the orchestration, drop the trigger in the Input directory, and you are good to go