JBOSS DROOLS is a business rule management system (BRMS). This document explain in detail step by step procedure to setup DROOLS in Eclipse IDE for work flow configuration and rule development. Eclipse IDE version used in this article is Eclipse Java EE IDE for Web Developers, Version: Indigo Service Release 2.
To start with , we need to install DROOL software in Eclipse. To do that
Go To Help → Install new software . A pop up appears as shown below . In Eclipse 3.4.1, go to Help → Software Updates.
Click on the link “Available Software Sites” link to check whether DROOLS has been already installed. On clicking the link a dialog appears as shown below. In Eclipse 3.4.1, Installed software's can be seen in the second tab.
If DROOLS is not installed, close the window and click on “Add” button in the install window. A dialog appears as shown below. In Eclipse 3.4.1, click on “Add Sites” button in the second tab.
Enter DROOLS in the name fields. Copy paste the following URL, “http://download.jboss.org/drools/release/5.4.0.Final/org.drools.updatesite/” in location and click on “Ok” button. A window appears as shown below. Display will be slightly different in Eclipse 3.4.1
Select DROOLS and jBPM Package and click next. It will redirect to install details screen. Click next and accept licensing term. Click “Finish”. DROOLS plugin will start installing into eclipse. After the installation eclipse will restart.
Procedure to create DROOLS Project in Eclipse
Step by step procedure to create a drool project is given below. Open eclipse. Go to File → New → Other. A pop up appears as shown below.
Select Drools project from DROOLS folder. After selection click on next button. A dialog appears as shown below
Enter a project name and click on next button. A new window appears as shown below. If you wish to have a sample rule file, select first two options, else uncheck the options.
A dialog appears as shown below
Click on configure work space settings. A pop up appears as shown below
Click on add button. A dialog appears as shown below
Click on create a new DROOLS 5 Runtime Button. A folder browser dialog opens. Browse a drive and select a blank folder and click on “Ok” button. Click on “OK” button of DROOLS Run Time window. Click on “Ok” button of install drools run time window. It will navigate to parent screen. Click finish to create a project. You had created your first Drools Project. Now lets us look at how to add rules and work flows.
To add a rule file , create a package. Right Click on the package and select new → Other. A dialog appears as shown below
Select Rule Resource from DROOLS folder and click next. A dialog appears as shown below.
Enter File Name and Rule Package Name and click on finish. Rule file will be created. For adding a Work Flow file select Flow File in the DROOLS package .