Red Hat Training

A Red Hat training course is available for JBoss Enterprise SOA Platform

Chapter 3. Creating a New Drools Project

3.1. Creating a Sample Drools Project

  1. To create a new Drools project, click FileNewProjectDroolsDrools Project . This will open the New Drools Project wizard.
    Type the project name into the relevant field and click the Next button.
  2. You will see a list of default artifacts to it like sample rules, decision tables or ruleflows and Java classes for them. Add the ones that are relevant to your project and click Next.
  3. You will be asked to specify a Drools runtime. If you have not yet set it up, you should do this now by clicking the Configure Workspace Settings link.
    You should see the Preferences window where you can configure the workspace settings for Drools runtimes. To create a new runtime, click the Add button. It will prompt you to enter a name for a new runtime and a path to the Drools runtime on your file system.

    Note

    A Drools runtime is a collection of .jars on your file system that represent one specific release of the Drools project .jars. When creating a new runtime, you must either point to the release of your choice or create a new runtime on your file system from the .jars included in the Drools Eclipse plugin.
  4. You can create a new Drools 5 runtime from the .jars embedded in the Drools Eclipse plugin. Click the Create a new Drools 5 runtime button, select the folder where you want the runtime to be created and click OK.
  5. You will see the newly created runtime show up in your list of Drools runtimes. Check it and click the OK button.
  6. Click the Finish to complete the project creation.
  7. Now you have a basic structure, classpath, sample rules and test case to get you started.