Drools 6.x Basic Example

Creating the Project Open Eclipse New -> Maven Project (simple project) Simple Project Group Id: com.skills421.examples.drools Artifact Id: Drools6.xExample Finish Structure pom.xml Rule Runner src/main/java com.skills421.examples.drools.controller.RuleRunner RuleRunnerException src/main/java com.skills421.examples.drools.exceptions.RuleRunnerException Fact src/main/java com.skills421.examples.drools.facts.Fact RuleResponse src/main/java com.skills421.examples.drools.facts.RuleResponse Person src/main/java com.skills421.examples.drools.facts.Person Rules src/main/resources/com/skills421/examples/drools/people DrinkingRules.drl kmodule.xml src/main/resources/META-INF kmodule.xml Main src/main/java com.skills421.examples.drools.Main Output

Advertisements

Drools6.1 and JavaFX8 with Java8 – Genealogy Rules

I wanted to create a simple project that integrated Drools6.0 with JavaFX8 using Java8 and some of its new features.  So, here goes. Objective We are going to go back to one of the classic problems of Genealogy.  You're tracing your family tree and you've found hundreds of people who could be related but matching … Continue reading Drools6.1 and JavaFX8 with Java8 – Genealogy Rules

Connecting Drools 5.6 to Camel to Fire Rules on Distributed Knowledge Sessions

Objective In this post we are going to create a Drools Stateful Knowledge Session and bind it to a JNDI address. We will then use Camel to fire all the rules in that session. This is useful where we wish to have multiple Knowledge Sessions on multiple servers. This example uses the Drools Grid - … Continue reading Connecting Drools 5.6 to Camel to Fire Rules on Distributed Knowledge Sessions

Connecting Drools 5.6 with Spring 3.x

This post is concerned predominantly with linking Spring3.x and Drools5.6. We will configure Spring, Drools and create a simple rule to test that we are up and running. Add the Drools Plug-in to Spring STS Start Eclipse Help -> Install New Software Work With: http://download.jboss.org/drools/release/5.5.0.Final/org.drools.updatesite/ click the "Add" button Name: Drools Check the Drools and … Continue reading Connecting Drools 5.6 with Spring 3.x