Drools.NET – .NET Rules Engine

26 Mar

Last couple of weeks, we had some issues in creating rules engine for our aviation requirements using Microsoft WWF(Windows Workflow Foundation), but unfortunately WWF doesn’t fufill our requirements. So, finally we decided to create a customized powerful rules engine and we got recommendation on Drools.NET framework from one of fellow of Microsoft Corporation.

Here, I would like to give brief introduction about Drools.NET framework – Basically, It is a Rules Engine implementation based on Charles Forgy’s Rete algorithm tailored for the Java language. Drools.NET enables .NET developers/Users to exploit the powerful Rule Engine like Drools through a completely managed .NET code base.

Basic sequence of steps to use a RuleBase

//Step 1: include the following namespace


using org.drools.dotnet; 

//Step 2: Use RuleBaseLoader to load the RuleBase. Many convenience methods, as described in Section 3.1.1, are available to load a RuleBase. Here i’am using ‘loadFromStream’ method

RuleBase ruleBase = RuleBaseLoader.loadFromStream(new FileInputStream(“helloworld.csharp.drl.xml”));  

//Step 3: Get an instance of WorkingMemory for the loaded RuleBase

WorkingMemory workingMemory = ruleBase.GetNewWorkingMemory(); 

//Step 4: Assert facts


//Step 5: Fire all Rules




Posted by on March 26, 2007 in Workflow


2 responses to “Drools.NET – .NET Rules Engine

  1. Peter Lin

    April 3, 2007 at 1:35 am

    You might want to check out the latest JBossRules 3. The old Drools2 is only forward chaining, whereas JBossRules 3 is the new version of Drools. The drools guys, which work for JBoss now have put a lot of work into drools3 aka JBossRules3. The performance of the latest BETA is atleast 60x faster than the old Drools2.

    there’s also a new eclipse IDE, which should make writing rules easier.

    peter lin

  2. AJ Weaver

    July 31, 2008 at 2:16 pm

    @Peter – Drools.Net 3.0 uses Jboss Rules 3.0


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: