Can you provide a good example of rule definition language written in C#.
Java guys have JESS, is there anything good for C#?
This page shows some examples of open-source rules engines in C#: http://csharp-source.net/open-source/rule-engines
You can use the forward chaining inference engine that is part of Windows Workflow Foundation (.NET 3.5 and higher) The best part is that this has a free runtime licensing.
You can use the Rule Manager from Acumen Business and install the Windows Workflow Foundation adapter. Once installed, export the rules as WFRules (*.rules). A visual studio .NET solution will be generated that shows how the rule engine can be invoked standalone (no workflow is necessary)
See also http://bizknowledge.blogspot.com/search/label/Windows%20Workflow%20Foundation
Try http://rulesengine.codeplex.com It has a fluent-interface wrapper for creating rules. It's lightweight and simple to use.
You could use Windows Workflow Foundation's (WF) workflow engine with C#. I'd started a small and simple project using WF as the workflow engine, it's actually quite straightforward to use. Check out the first part entry I've been developing on this here.
What is interesting about WF is that you don't have to use the whole thing if you want to - if you only want to write some custom rules against some entities or objects, you can - quite ingenious! Also, it's a lot less to take on board than BizTalk's BRE (and no licensing cost).
You need to add a reference to the following .Net assemblies, available in the .Net Framework v3.0 and onwards:
- System.Workflow.Activities
- System.Workflow.ComponentModel
- System.Workflow.Runtime
Check out the article for more info.
There is the Microsoft Business Rules Engine: http://msdn.microsoft.com/en-us/library/aa561216.aspx. Not sure if it can only be used inside Biztalk - it does says it is a .Net Class Library.
Microsoft Business Rule Engine(BRE) is quite nice. But(and that's a big BUT) you'll need a BizTalk Server license to use it.
Take a look at Jetfire on codeplex. It supports forward chaining 'rules'.
Modern alternatives seem to be:
- Microsoft's own RuleEngine, which seems to be built upon a JSON rule definition including third-party (wed) editors
- NRules seems to be flexible and powerful, but JSON serialization is only possible through a module and looks, from a first glance, less readable than RuleEngine
Here is a blog post comparing these, including comparing to a self-written RuleEngine.
© 2022 - 2024 — McMap. All rights reserved.