Chapter 4. The (Eclipse based) Rule IDE

Table of Contents

Features outline
Creating a Rule project
Creating a new rule and wizards
Textual rule editor
Guided editor (rule GUI)
Views
The Working Memory View
The Agenda View
The Global Data View
The Audit View
Domain Specific Languages
Editing languages
The Rete View
Large drl files
Debugging rules
Creating breakpoints
Debugging rules

The IDE provides developers (and very technical users) with an environment to edit and test rules in various formats, and integrate it deeply with their applications. In cases where you prefer business rules and web tooling, you will want to look at the BRMS (but using the BRMS and the IDE together is not uncommon).

The Drools IDE is delivered as an Eclipse plug-in, which allows you to author and manage rules from within Eclipse, as well as integrate rules with your application. This is an optional tool, and not all components are required to be used, you can use what components are relevant to you. The Drools IDE is also a part of the Red Hat Developer Studio (formerly known as JBoss IDE).

This guide will cover some of the features of JBoss Drools, in as far as the IDE touches on them (it is assumed that the reader has some familiarity with rule engines, and Drools in particular. It is important to note that none of the underlying features of the rule engine are dependent on Eclipse, and integrators are free to use their tools of choice, as always ! Plenty of people use IntelliJ with rules, for instance.

Note you can get the plug-in either as a zip to download, or from an update site (refer to the chapter on installation).

Figure 4.1. Overview

Overview

Features outline

The rules IDE has the following features

  1. Textual/graphical rule editor

    1. An editor that is aware of DRL syntax, and provides content assistance (including an outline view)

    2. An editor that is aware of DSL (domain specific langauge) extensions, and provides content assistance.

  2. RuleFlow graphical editor

    You can edit visual graphs which represent a process (a rule flow). The RuleFlow can then be applied to your rule package to have imperative control.

  3. Wizards to accelerate and ...

    1. Help you quickly create a new "rules" project

    2. Create a new rule resource

    3. Create a new Domain Specific language

    4. Create a new decision table, guided editor, ruleflow

  4. A domain specific language editor

    1. Create and manage mappings from your users language to the rule language

  5. Rule validation

    1. As rules are entered, the rule is "built" in the background and errors reported via the problem "view" where possible

You can see the above features make use of Eclipse infrastructure and features. All of the power of Eclipse is available.