0

I am using BizTalk server deployment framework (Sure many of Biztalkers do so) to generate environment specific bindings. When I'm deploying my solution to a new environment, I'm manually setting connection strings and URLs for sendports/receive locations. Then I am exporting binding file and manually writing Xpaths to a values that change in this environment to a SettingFileGenerator.xml.

This is quite routine job to do and I'm asking if there is a 'smart' (automatic) way to compare my default bindings and bindings of some specific environment to extract Xpaths to a values that differ?

Dijkgraaf
  • 11,049
  • 17
  • 42
  • 54
Arsen Magomedov
  • 480
  • 8
  • 21
  • Sorry did not get yr question? What Xpaths are these. Don't u have environment specific variables in settings file? when you say new environment does this mean, it's not there in settings file – Vikas Bhardwaj Oct 06 '14 at 11:17
  • As I know, that environment specific variables are defined as Xpaths. BTDF uses those Xpaths to find and replace some environment specific values in PortBindingsMaster.xml file. Am I wrong? Are you saying, that I can define that variables with just a name and use that name in PortBindingsMaster file? – Arsen Magomedov Oct 06 '14 at 13:29

2 Answers2

2

Yes that's correct. You can open the settingsfileGenerator.xml in excel and can add as many variables as you want in left most column and their values in specific environment columns. Use ${variable_name} in master binding file, where variable_name is same as value you have entered in excel left most column.

In your btdf proj file You should add following properties in PropertyGroup, if not there already

<RequireXmlPreprocessDirectives>False</RequireXmlPreprocessDirectives>
<IncludeMessagingBindings>True</IncludeMessagingBindings>
<UsingMasterBindings>True</UsingMasterBindings>

Please note, this is based on BTDF version 5.0

In your InstallWizard.xml file make sure you have a ENV_SETTINGS environment variable defined which will be used by MSI to select the specific environment xml before replacing variables in binding file

<SetEnvUIConfigItem>
    <PromptText>Select the XML file that contains configuration information specific to this environment:</PromptText>
    <PromptValue></PromptValue>
    <ValueType>FileSelect</ValueType>
    <EnvironmentVarName>ENV_SETTINGS</EnvironmentVarName>
  </SetEnvUIConfigItem>
Vikas Bhardwaj
  • 1,455
  • 8
  • 10
0

In addition to Vikas Bhardwaj's answer, if you go on BTDF (Biztalk Deployment Framework) way, you can generate/update PortBindingsMaster.xml file using this web based utility ( http://bbiztalk.com/?page_id=31 ) - you will need to provide your exported bindings (from Biztalk Admininistration) and SettingsFileGenerator.xml as inputs.