Managing Itineraries is one of the more tedious and tricky aspects of BizTalk deployments because it is possible that some values in Resolvers are specific for a certain environment. For example a File location in the Development environment is probably not the same as in the Production environment.
To address this problem, the Deployment Framework includes in each BizTalk project an Excel spreadsheet named SettingsFileGenerator.xml that captures an unlimited number of "settings" (name/value pairs) stored as rows in the spreadsheet. Each setting (row) has a default value in addition to a value for any number of deployment environments (stored in columns). This makes it very easy to manage a large matrix of settings across environments in one place.
During the deployment process, setting values from your Excel settings spreadsheet are seamlessly merged with the Itinerary file(s) to produce an environment-specific Itinerary. In the Itinerary, you replace environment-specific values with tokens that correspond to setting names in the spreadsheet.
The following steps describe how you can automatically preprocess your itineraries to replace tokens with the environment specific values.
|In Visual Studio open the Solution with the Itineraries.|
|Add a new Deployment Framework for BizTalk project to the Solution.|
|Open the Deployment.btdfproj file and set the IncludeEsbItineraries property to true.|
|Add the FilesToXmlPreprocess setting to make sure that the Itinerary is preprocessed. (to replace the tokens with the environment specific values.)|
|Add the EsbItineraries setting to deploy the Itinerary.|
<ItemGroup> <FilesToXmlPreprocess Include="ProcessDespatchAdvices.xml"> <LocationPath>..\ESB</LocationPath> </FilesToXmlPreprocess> <EsbItineraries Include="ProcessDespatchAdvices.xml" > <LocationPath>..\ESB</LocationPath> </EsbItineraries> </ItemGroup>
.csharpcode, .csharpcode pre
|Create or edit an Itinerary in the Itinerary Designer and set the Model Exporter property to: XML.|
|In the Itinerary, locate an environment-specific configuration value, for example a Resolver that uses the FILE adapter and replace the location with a token.|
|Open the file SettingsFileGenerator.xml with Excel and enter the name for the configuration element on an empty row. In the environment-specific columns or the Default Values column, enter the appropriate value for each environment.|
|Deploy the Itinerary with the Deployment Framework.|
|Open SQL Server Management Studio and select the Itinerary XML to test if the tokens are replaced.|
Once the itinerary is deployed to the Itinerary Store database and a Receive Location in BizTalk is created that uses the Itinerary, the solution is ready to be tested.
Run DebugView to watch the trace output.
For more information on using the Deployment Framework with ESB itineraries see:
- Use the Deployment Framework for BizTalk Server to deploy your ESB itineraries
- Use the BTDF-SSO Resolver to dynamically resolve settings via SSO