Example of c# based rule language?
Asked Answered
A

8

16

Can you provide a good example of rule definition language written in C#.
Java guys have JESS, is there anything good for C#?

Alboin answered 4/9, 2008 at 13:54 Comment(1)
This article can help codeproject.com/KB/aspnet/buisness-rules-asp-net.aspxArrangement
D
9

This page shows some examples of open-source rules engines in C#: http://csharp-source.net/open-source/rule-engines

Decapod answered 4/9, 2008 at 13:57 Comment(0)
C
2

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

Cab answered 28/2, 2010 at 5:6 Comment(0)
O
2

Try http://rulesengine.codeplex.com It has a fluent-interface wrapper for creating rules. It's lightweight and simple to use.

Outworn answered 19/10, 2011 at 4:53 Comment(1)
I wouldn't call this a rules engine IMO. It's more like a validation engine.Crescent
I
1

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.

Incoordinate answered 16/11, 2010 at 16:44 Comment(0)
C
0

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.

Craal answered 4/9, 2008 at 13:57 Comment(1)
It can be used outside BizTalk, but you need a valid BizTalk License.Osrock
T
0

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.

Twobyfour answered 10/10, 2008 at 22:58 Comment(0)
M
0

Take a look at Jetfire on codeplex. It supports forward chaining 'rules'.

Moor answered 17/3, 2012 at 14:16 Comment(0)
G
0

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.

(same as here)

Give answered 5/3 at 10:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.