Show Table of Contents
18.8. Creating a New Rule
Procedure 18.3. Task
- Create an empty text .drl file.
- Copy and paste your rule into it.
- Save and exit.
- Alternatively, use the Rules Wizard to create a rule but pressing
Ctrl+Nor by choosing it from the toolbar. - The wizard will ask for some basic options for generating a rule resource. For storing rule files you would typically create a directory src/rules and create suitably named subdirectories. The package name is mandatory, and is similar to a package name in Java. (That is, it establishes a namespace for grouping related rules.)
- Select the options that suit you and click
Finish.
Result
You now have a rule skeleton which you can expand upon.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.