Drools.NET vs Windows Workflow Foundation (WF)

2019-03-09 20:42发布

问题:

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.

回答1:

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.



回答2:

the fact that biztalk is not going to be replaced easily by wwf is true. The objectives are very different between them, drools compares to biztalk and not with wwf, reasons, both use the same alogorithm (rete)!!

Now, using drools is something else, biztalk also functions as an ESB, can drools do that?