File this under “I didn’t know that!” Did you know that if you add multiple BizTalk binding files (which all target the same environment) to an application, that they ALL get applied during installation? Let’s talk about this.
So I have a simple application with a few messaging ports. I then generated four distinct binding files out of this application:
- Receive ports only (dev environment port configurations)
- Send ports only (dev environment port configurations)
- Send ports only (test environment port configurations)
- Send ports only (all environment port configurations)
The last binding (“all environment port configurations”) includes a single send port that should exist in every BizTalk environment.
Now I added each binding file to the existing BizTalk application while setting environment designations for each one. For the first two I set the environment to “dev”, set the next send port binding to “test” and left the final send port (“all”) with an empty target (which in turn defaults to ENV:ALL).
Next I exported an MSI package and chose to keep all bindings in this package.
Then I deleted the existing BizTalk application so that I could test my new MSI package. During installation of the MSI, we are asked for which environment we wish to target. I chose “dev” which means that both binding files targeted to “dev” should apply, AND, the binding file with no designation should also come into play.
Sure enough, if I view my application details in the BizTalk Administration Console, we can see that a full set of messaging artifacts were added. Three different binding files were consumed during this installation.
So why does this matter? I can foresee multiple valuable uses of this technique. You could maintain distinct binding files for each artifact type (e.g. send ports, receive ports, orchestrations, rules, resources, pipelines, etc) and choose to include some or all of these in each exported MSI. For incremental upgrades, it’s much nicer to only include the impacted binding artifact. This provides a much cleaner level of granularity that helps us avoid unnecessarily overwriting unchanged configuration items. In the future, it would be great if the BizTalk Admin Console itself would export targeted bindings (by artifact type), but at least the Console respects the import of segmented bindings.
Have you ever used this technique before?
Technorati Tags: BizTalk