views:

2113

answers:

1

I am currently in the process of searching for a rules engine that works in .NET. Our logic is pretty simple, +, -, *, /, and, or, basic order of operations stuff. However we are going to need to store this information in the database and then generate the rules file when a new version is pulled from the database. So the common UI editors are going to be useless to us, unless one of them has a web version UI editor.

So my question is, given what I have said, which is going to be the best rules engine for us in terms of programmatic configuration and integration with ASP.NET.

+9  A: 

My experience with WWF has been pretty bad. Its great for developing a workflow that you know is going to exist (such as "this document goes to a person's manager, then to HR, if its invalid it goes back to the submitter") but a real pain if you want dynamic configuration. As you can tell we tried to use it for a fully configurable system, something that BizTalk does really well, and it looks like MS isn't keen on letting developers replace BizTalk so cheaply.

We also looked at using the Acumen rules engine and tools which looked like a great fit for what we needed though we never got the time to remove WWF and replace it.

I would strongly recommend that if your rules are going to be relatively simple that you either use a rules engine you have the source code to or write it yourself. Justin Etheredge has a two part article about performing domain validation through custom rules using the pattern identified in Domain-Driven Designs (Evans).

I've implemented a similar system in my current project following the same guidelines and I serialize/deserialize rules from the database. I will have to take a look at Drools.NET.

cfeduke
I had to lol at your comment that Microsoft isn't keen on people replacing BizTalk with WF so cheaply.
Tundey