Create a Drools Program - rules engine - drools tutorial - business rules engine
- For create a basic Drools program, open Eclipse. Go to File b → New → Project.
learn drools tutorial - basic drools program - drools example
- Choose Drools Project. Give a right name for the project. For example, Drools Test.
- The next screen prompts you to Choose some files which you need in your first Drools project.
learn drools tutorial - new drools project - drools example
- Choose the first two files. The first file is a.drl file (Drools Rule File) and the second file is a Java class for loading and executing the HelloWorld rule.
- Click Next → Finish.
learn drools tutorial - select drools runtime - drools example
- Once you click Finish, a <DroolsTest> project is created in your workspace.
- Open the Java class and then right-click and run as Java application. You would see the output as shown here:
learn drools tutorial - drools result - drools example