Drools Rules

In part1 we covered the Problem Domain, in part2 we set up our project to work with Drools 5.4.0.Final and JUnit.  Now in part3 we will create the Classes for our Facts that we are going to pass to the Rule Engine.

Creating the Facts

If we remember from our Problem Domain, the main fact that we will provide to the Rule Engine (for now) is each Person for whom we have found a record.

For this reason we will need a Person class.  Also, since we are going to be doing a lot of Date comparison and manipulation, we will extend the java.util.Date class to give us and ExtendedDate class into which we can add any new methods that we require.

Since the Person class will have a dependency on the ExtendedDate class, let’s start with the ExtendedDate class.


in the src/main/java source folder, create the package com.skills421.training.extend.util

View original post 380 more words

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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