Blog #11

Blog #4

 19 Jun 2017

In almost every project I've worked on, at some point a requirement surfaces that talks about "configurable business rules".

The benefits to a project are obvious and some of the reasons cited are:

  • Dealing with regularly changing business logic or rules
  • The business needs visibility into business logic execution
  • Users wish modify business logic without a developer 

The purpose of this post is to give you options and ideas to think about in terms of rolling out your own business rule engine.


Depending on how much configuration management is needed you have a few.

  1. Implement configuration tables that enable / disable specific branches of code in your application based on values held in your configuration tables.
  2. Off the shelf solution.
  3. Build your own dynamic rules engine - an extension of #1 but with much more dynamic code.

I've applied all of the above to different projects and here is what I've found.

Configuration Tables

Minimal effort.  Suitable if the configuration changes you need to deal with are simple.  For example, you have an application that extracts X number of records from the database for each query.  The value for X could be defined in the admin section of your application and fetched at run-time thereby giving you an element of configuration management.

Off The Shelf

You'll need to do your homework and see what's out there. Integration with your existing product stack, training, licensing costs or technical support all need to be considered.

Workflow Foundation integrates easily with your .NET web applications.  Easy to build workflows in Visual Studio and is what I've used in the past.

You can easily model process flows and develop business rules through the designer canvas that ships out the box.  You can re-host the Workflow Designer in a standalone WPF application for business analysts to use on their machines.  The designer canvas offers a rich drag and drop user experience which is hard to beat.

One thing worth mentioning that when you re-host the Workflow Designer in a WPF application you'll lose IntelliSense support.

ActiPro have a product which helps you get round that though.  Speak to them nicely enough and they may give you a demo application too (they sent me a copy).


If you'd like to find our more, click the image below to Download 'Make Your Code More Readable, Secure & Maintainable'

Or View Our Diary And Book In A Call

Also included:

  • How To Simplify Windows Development Using TopShelf
  • ASP.NET Patterns & Practices (MVC)
  • Should You Use Workflow Foundation In Your Project?


Currently there are no comments. Be the first to post one!

Post Comment