Drools
Drools
Preface
I. Reference Manual
1. Drools 4.0 Release Notes
1.1. What is new in Drools 4.0
1.1.1. Language Expressiveness Enhancements
1.1.2. Core Engine Enhancements
1.1.3. IDE Enhancements
1.1.4. Business Rules Management System - BRMS
1.1.5. Miscellaneous Enhancements
1.2. Upgrade tips from Drools 3.0.x to Drools 4.0.x
1.2.1. API changes
1.2.1.1. Working Memory creation
1.2.1.2. Working Memory Actions
1.2.2. Rule Language Changes
1.2.2.1. Working Memory Actions
1.2.2.2. Primitive support and unboxing
1.2.3. Drools Update Tool
1.2.4. DSL Grammars in Drools 4.0
1.2.5. Rule flow Update for 4.0.2
2. The Rule Engine
2.1. What is a Rule Engine?
2.1.1. Introduction and Background
2.2. Why use a Rule Engine?
2.2.1. Advantages of a Rule Engine
2.2.2. When should you use a Rule Engine?
2.2.3. When not to use a Rule Engine
2.2.4. Scripting or Process Engines
2.2.5. Strong and Loose Coupling
2.3. Knowledge Representation
2.3.1. First Order Logic
2.4. Rete Algorithm
2.5. The Drools Rule Engine
2.5.1. Overview
2.5.2. Authoring
2.5.3. RuleBase
2.5.4. WorkingMemory and Stateful/Stateless Sessions
2.5.4.1. Facts
2.5.4.2. Insertion
2.5.4.3. Retraction
2.5.4.4. Update
2.5.4.5. Globals
2.5.4.6. Shadow Facts
2.5.4.7. Property Change Listener
2.5.4.8. Initial Fact
2.5.5. StatefulSession
2.5.6. Stateless Session
2.5.7. Agenda
2.5.7.1. Conflict Resolution
2.5.7.2. Agenda Groups
2.5.7.3. Agenda Filters
2.5.8. Truth Maintenance with Logical Objects
2.5.8.1. Example Scenario
2.5.8.2. Important note: Equality for Java objects
2.5.9. Event Model
2.5.10. Sequential Mode
3. Installation and Setup (Core and IDE)
3.1. Installing and using
3.1.1. Dependencies and jars
3.1.2. Runtime
3.1.3. Installing IDE (Rule Workbench)
3.1.3.1. Installing GEF (a required dependency)
3.1.3.2. Installing from zip file
3.1.3.3. Installing from the update site
3.2. Setup from source
3.3. Source Checkout
3.4. Build
3.4.1. Building the Source
3.4.2. Building the Manual
3.5. Eclipse
3.5.1. Generating Eclipse Projects
3.5.2. Importing Eclipse Projects
3.5.3. Exporting the IDE Plugin
3.5.4. Building the update site
4. Decision Tables
4.1. Decision tables in spreadsheets
4.1.1. When to use Decision tables
4.1.2. Overview
4.1.3. How decision tables work
4.1.4. Keywords and syntax
4.1.4.1. Syntax of templates
4.1.4.2. Keywords
4.1.5. Creating and integrating Spreadsheet based Decision Tables
4.1.6. Managing business rules in decision tables.
4.1.6.1. Workflow and collaboration.
4.1.6.2. Using spreadsheet features
5. The (Eclipse based) Rule IDE
5.1. Introduction
5.1.1. Features outline
5.1.2. Creating a Rule project
5.1.3. Creating a new rule and wizards
5.1.4. Textual rule editor
5.1.5. Guided editor (rule GUI)
5.1.6. Views
5.1.6.1. The Working Memory View
5.1.6.2. The Agenda View
5.1.6.3. The Global Data View
5.1.6.4. The Audit View
5.1.7. Domain Specific Languages
5.1.7.1. Editing languages
5.1.8. The Rete View
5.1.9. Large drl files
5.1.10. Debugging rules
5.1.10.1. Creating breakpoints
5.1.10.2. Debugging rules
6. The Rule Language
6.1. Overview
6.1.1. A rule file
6.1.2. What makes a rule
6.1.3. Reserved words
6.2. Comments
6.2.1. Single line comment
6.2.2. Multi line comment
6.3. Package
6.3.1. import
6.3.2. expander
6.3.3. global
6.4. Function
6.5. Rule
6.5.1. Rule Attributes
6.5.1.1. no-loop
6.5.1.2. lock-on-active
6.5.1.3. salience
6.5.1.4. agenda-group
6.5.1.5. auto-focus
6.5.1.6. activation-group
6.5.1.7. dialect
6.5.1.8. date-effective
6.5.1.9. date-exptires
6.5.1.10. duration
6.5.2. Left Hand Side (when) Conditional Elements
6.5.2.1. Pattern
6.5.2.2. 'and'
6.5.2.3. 'or'
6.5.2.4. 'eval'
6.5.2.5. 'not'
6.5.2.6. 'exists'
6.5.2.7. 'forall'
6.5.2.8. From
6.5.2.9. 'collect'
6.5.2.10. 'accumulate'
6.5.3. The Right Hand Side (then)
6.5.4. A note on auto boxing/unboxing and primitive types
6.6. Query
6.7. Domain Specific Languages
6.7.1. When to use a DSL
6.7.2. Editing and managing a DSL
6.7.3. Using a DSL in your rules
6.7.4. Adding constraints to facts
6.7.5. How it works
6.7.6. Creating a DSL from scratch
6.7.7. Scope and keywords
6.7.8. DSLs in the BRMS and IDE
6.8. Rule Flow
6.8.1. Assigning rules to a ruleflow group
6.8.2. A simple ruleflow
6.8.3. How to build a rule flow
6.8.4. Using a rule flow in your application
6.8.5. Different types of nodes in a ruleflow
6.9. XML Rule Language
6.9.1. When to use XML
6.9.2. The XML format
6.9.3. Legacy Drools 2.x XML rule format
6.9.4. Automatic transforming between formats (XML and DRL)
7. Deployment and Testing
7.1. Deployment options
7.1.1. Deployment using the RuleAgent
7.1.2. Deployment using drl source
7.1.3. Deploying rules in your classpath
7.1.4. Deployable objects, RuleBase, Package etc.
7.1.4.1. DRL and PackageDescr
7.1.4.2. Package
7.1.4.3. RuleBase
7.1.4.4. Serializing
7.1.5. Deployment patterns
7.1.5.1. In process rule building
7.1.5.2. Out of process rule building
7.1.5.3. Some deployment scenarios
7.1.6. Web Services
7.1.7. Future considerations
7.2. Testing
7.2.1. Testing frameworks
7.2.2. FIT for Rules - a rule testing framework
8. The Java Rule Engine API
8.1. Introduction
8.2. How To Use
8.2.1. Building and Registering RuleExecutionSets
8.2.2. Using Stateful and Stateless RuleSessions
8.2.2.1. Globals
8.3. References
9. The BRMS (Business Rule Management System)
9.1. Introduction
9.1.1. What is a BRMS?
9.1.1.1. When to use a BRMS
9.1.1.2. Who uses a BRMS
9.1.2. Features outline
9.2. Administration guide
9.2.1. Installation
9.2.1.1. Supported and recommended platforms
9.2.2. Database configuration
9.2.2.1. Changing the location of the data store
9.2.2.2. Configuring the BRMS to use an external RDBMS
9.2.2.3. Searching and indexing, Version storage
9.2.3. Security
9.2.3.1. Using your containers security and LDAP
9.2.4. Data management
9.2.4.1. Backups
9.2.4.2. Asset list customization
9.2.4.3. Customised selectors for package building
9.2.4.4. Adding your own logos or styles to the BRMS web GUI
9.2.4.5. Import and Export
9.3. Architecture
9.3.1. Building from source
9.3.1.1. Modules
9.3.1.2. Working with Maven 2
9.3.1.3. Working with GWT
9.3.1.4. Debugging, Editing and running with Eclipse
9.3.2. Re-usable components
9.3.3. Versioning and Storage
9.3.4. Contributing
9.4. Quick start guide
9.4.1. Quick start guide
9.4.1.1. Supported browser platforms
9.4.1.2. Initial configuration
9.4.1.3. Writing some rules
9.4.1.4. Finding stuff
9.4.1.5. Deployment
9.4.2. BRMS concepts
9.4.2.1. Rules are assets
9.4.2.2. Categorisation
9.4.2.3. The asset editor
9.4.2.4. Rule authoring
9.4.2.5. Templates of assets/rules
9.4.2.6. Status management
9.4.2.7. Package management
9.4.2.8. Version management
9.4.2.9. Deployment management
9.4.2.10. Navigating and finding rules
9.4.3. The business user perspective
9.4.4. Deployment: Integrating rules with your applications
9.4.4.1. The Rule Agent
9.4.4.2. Manual deployment
10. Examples
10.1. Getting the examples
10.1.1. Hello World
10.1.2. State Example
10.1.2.1. Understanding the State Example
10.1.3. Banking Tutorial
10.1.4. Fibonacci Example
10.1.5. Golfing Example
10.1.5.1. The riddle
10.1.5.2. Launching the example
10.1.5.3. The matching rule
10.1.5.4. Conclustion
10.1.6. Trouble Ticket
10.1.6.1. Executing the Example
10.1.6.2. Platinum gets the best service
10.1.6.3. Silver and Gold
10.1.6.4. Escalating
10.1.6.5. Running it
10.1.7. Pricing Rule Decision Table Example
10.1.7.1. Executing the example
10.1.7.2. The decision table
10.1.8. Shopping Example
10.1.8.1. Running the example
10.1.8.2. Discounts and purchases
10.1.8.3. Calculating the discount
10.1.9.
10.1.9.1. Pet Store Example
10.1.10. Honest Politician Example
10.1.11. Sudoku Example
10.1.11.1. Sudoku Overview
10.1.11.2. Running the Example
10.1.11.3. Java Source and Rules Overview
10.1.11.4. Sudoku Validator Rules (validatorSudoku.drl)
10.1.11.5. Sudoku Solving Rules (solverSudoku.drl)
10.1.11.6. Suggestions for Future Developments
10.1.12.
10.1.12.1. Number Guess
10.1.13. Miss Manners and Benchmarking
10.1.13.1. Introduction
10.1.13.2. Indepth look
10.1.13.3. Output Summary
10.1.14. Conways Game Of Life Example
10.1.15. Insurance Company Risk Factor and Policy price (using BRMS)
10.1.15.1. BRMS editors
10.1.15.2. Introduction
10.1.15.3. The insurance logic
10.1.15.4. Downloading and installing the BRMS
10.1.15.5. Deploying the insurance example in your application server
10.1.15.6. Running the example from the web page
Index