Geeks With Blogs

El Grego BizTalk blog
I’ve watched several times Jurgen Willis’ excellent online presentation about the Business Rule Engine (BRE). One of the BRE usage scenarios demoed by him contains a sample orchestration that uses the BRE to dynamically configure a delay time.
This confused me since it added another option to accomplish dynamic configuration of business processes. We are definitely facing a configuration dilemma now; here are some of the alternatives:
  • Config Files
    Use the default .NET config files as the store (BTSNTSvc.exe.config) for your key-value pairs or custom types. You can easily read the settings using the default .net classes from inside your orchestrations.
    This is definitely the easiest option. But it makes your business processes host-instance depended (every host instance can be differently configured). It’s also not easily deployable, when having different environments you will have to manually copy paste your configuration sections, you could easily make mistakes. I guess there are no tools available for the business users to manage the values.
  • Business Rule Engine
    Although I have the feeling the BRE and its terminology is not really geared towards this simple functionality (storing key-value pairs). Most of the BizTalk included samples use schema-facts, some of them use class-facts but none addresses the config management purpose which was demoed in the presentation.
    I’ve tested a couple of things myself, including calling the BRE from code inside an orchestration by using several Stringbuilder instances or a Hashtable as the argument(s). This seemed a very strange solution to me (it’s not easy to define the rules/vocabularies when having several instances of the same class).  Another option is to create a custom configuration class which gets and sets the values, this will simplify the vocabulary. Or you could always use the classic approach and create a custom schema to hold your configuration values.
Finally I emailed Jurgen, who appeared to be a very friendly and helpful man. He pointed me out that the BRE is in fact not specifically targeted at this scenario and that, in general, it focuses more on complex types than on using value types (especially when multiple instances are evaluated in the same policy). 
Posted on Wednesday, November 17, 2004 5:25 AM | Back to top

Comments on this post: The BizTalk Configuration Dilemma

# re: The BizTalk Configuration Dilemma
Requesting Gravatar...
CMAB is doable; we've done for a number of our customers. In a nutshell, here's what you have to do:

1. Modify the BTSNtSvc.exe.config file to include your CMAB configuration.

2. (Optional) If you use CMAB from a map and you want Test Map to work, you need to modify devenv.exe.config as well.

3. Ensure that the BTS host identity has access to the configuration sources listed in the CMAB config. For example, if you use a SQL source, the host identity needs appropriate access to the database.

The verdict: It's not perfect, but it's

a) better than straight config files, particularly when you have multiple BTS servers;

b) more flexible than BRE in that it can be easily used from pipelines, maps and adapters as well as orchestrations; and,

c) the programming model is very simple.

On the downside:

a) Debugging CMAB setup issues can be a big pain. A lot of work is done in a static constructor which means you have to catch the first access. The Debug | Exceptions... dialog in VS.NET is your friend.

Drop me an e-mail at jshantz(at) if you want to talk about it some more.
Left by Jason Shantz on Nov 17, 2004 6:51 PM

# re: The BizTalk Configuration Dilemma
Requesting Gravatar...
We are using the Rules Engine, this works well for configuration information that we need to use within orchestrations.

A colleague has a sample here....

Left by Kurt Mudford on Nov 18, 2004 12:51 AM

# re: The BizTalk Configuration Dilemma
Requesting Gravatar...
We're currently coming up against this issue, and have had some success with the BRE - most notably the fact that certain config values are thereby made available to business analysts, rather than techies.
Left by Hugo Rodger-Brown on Nov 18, 2004 10:20 AM

# re: The BizTalk Configuration Dilemma
Requesting Gravatar...
Thank you all for the feedback.

According to Jason combining CMAB/BizTalk combination is doable, this sounds very promising: I will certainly invest some time in the CMAB

I've also tested Nigel Parker's nice BRE sample some time ago...

Maybe this article about 'Helper class for Adding XML to documents using the Rules Engine' posted on Scott Woodgate's blog can also come in handy when you call the BRE with an empty configuration.xml instance, never tested it though...
Left by Grego on Nov 18, 2004 12:28 PM

# re: The BizTalk Configuration Dilemma
Requesting Gravatar...
Hi Grego... I updated the sample last week to include an auto build script for deploying vocabularies and policies that a colleague of mine (Nikolai Blackie) had written. I found this improved the deployment process for the BRE method. E.g. you no longer need to use the Rules Engine deployment engine.

I was also thinking about investigating the 'Helper class for Adding XML to documents using the Rules Engine' it's on my to do list!
Left by Nigel Parker on Nov 18, 2004 6:58 PM

# re: The BizTalk Configuration Dilemma
Requesting Gravatar...
I also have experimented and developed a BizTalk project using CMAB to store configurations. One point I dislike is that, if you use CMAB "out-of-the-box", you have to edit BTSNtSvc.exe.config, even if only to store the location of a different config file.

Another relevant point, and a downside, is that all the Orchestrations running in BizTalk can read the complete set of configurations of all Orchestrations, even if they are totaly unrelated processes...
Left by jota on Nov 19, 2004 12:50 AM

# re: The BizTalk Configuration Dilemma
Requesting Gravatar...
An Affiliate Application is another option. The docs say to avoid using some of the classes that you need to interact with an Affiliate Application but it is possible...
Left by AndyM on Dec 21, 2004 5:38 PM

# re: The BizTalk Configuration Dilemma
Requesting Gravatar...
The enterprise library, incorporating the CMAB, is coming soon now ( It's definitely worth a look and a test with BizTalk, it will offer new functionality and it integrates new versions of several of the existing application blocks; the blocks will be better tuned for interaction.

Thanks for all the feedback. If you can, do as myself and leave BizTalk for a few days; go enjoy the holidays. A happy new year, my best wishes!
Left by Grego on Dec 22, 2004 8:34 AM

# re: The BizTalk Configuration Dilemma
Requesting Gravatar...
What you mean by "default .net classes"
above. I am trying to call class which
needs connection string from configuration
file. Can I just put it into btsntsvc.config
like any other app config file?

Left by sanjay on Jun 08, 2005 8:24 PM

# BizTalk configuration with the Business Rule Engine
Requesting Gravatar...
&amp;nbsp;<br />We can use the rules engine to store parameters that can be accessed from orchestrations. <br />&amp;nbsp;...
Left by Francisco Ruiz From M&#225;laga (Spain) on Apr 15, 2007 1:05 PM

Your comment:
 (will show your gravatar)

Copyright © Gregory Van de Wiele | Powered by: