Code BizTalk Business Rules in C# vs BRE When You Can

So, I already know that there will likely be vehement opposition to this post but that’s cool – that’s what being in America is all about… the opportunity to offer unsolicited opinions freely! 🙂

We worked on a BizTalk Server (BTS) project last year that afforded us the opportunity to learn lots of lessons.  One of the biggest I learned is that the Business Rule Engine (BRE) is good; however, it is not the panacea for all things BizTalk.  I think it should be used strategically; which means analysis and planning (this is a struggle for many IT shops), and good design as to how the BRE will interact in the overall solution and the enterprise.  The project we did had over 800 business rules, all of which made calls to helper classes for processing – interesting… if our rules are so complex that we are going to call helper classes written in C# for additional processing (and they are), then why not simply code the rules in C# business rule classes to begin with and eliminate the BRE layer altogether?  Stop cringing – it’s not taboo! 🙂

Now, for simple projects that have rules that are also simple enough to process without helper classes; I say, OK go for it.  But for complex rules, I prefer to code Rules Classes/Librairies in C# thus creating an enterprise business rule layer.  This is what we did on our current project and we were able to complete the rules phase of the project in a fraction of the time we spent on the first project.

So, my point is not to rule out the BRE, but simply to use it strategically. Software solutions can be robust, functional and appealing with very simple vs complex coding and development approaches.

One more point to make with my preference is that if something ever changes or goes awry with the business rules, a .NET coder can take a look at the problem without having to come up-to-speed on the BRE.

Just my thoughts!

One thought on “Code BizTalk Business Rules in C# vs BRE When You Can

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s