JBoss.orgCommunity Documentation

Drools Documentation

Version 6.3.0.Beta2


I. Welcome
1. Introduction
1.1. Introduction
1.2. Getting Involved
1.2.1. Sign up to jboss.org
1.2.2. Sign the Contributor Agreement
1.2.3. Submitting issues via JIRA
1.2.4. Fork GitHub
1.2.5. Writing Tests
1.2.6. Commit with Correct Conventions
1.2.7. Submit Pull Requests
1.3. Installation and Setup (Core and IDE)
1.3.1. Installing and using
1.3.2. Building from source
1.3.3. Eclipse
2. Release Notes
2.1. New and Noteworthy in KIE Workbench 6.3.0 Beta 2
2.1.1. Data Set Authoring
2.2. New and Noteworthy in KIE Workbench 6.3.0 Beta 1
2.2.1. Real Time Validation and Verification for the Decision Tables
2.2.2. Improved DRL Editor
2.2.3. Generation of JPA enabled Data Models
2.3. What is New and Noteworthy in Drools 6.2.0
2.3.1. Propagation modes
2.4. New and Noteworthy in KIE Workbench 6.2.0
2.4.1. Download Repository or Part of the Repository as a ZIP
2.4.2. Project Editor permissions
2.4.3. Unify validation style in Guided Decision Table Wizard.
2.4.4. Improved Wizards
2.4.5. Consistent behaviour of XLS, Guided Decision Tables and Guided Templates
2.4.6. Improved Metadata Tab
2.4.7. Improved Data Objects Editor
2.4.8. Execution Server Management UI
2.4.9. Social Activities
2.4.10. Contributors Dashboard
2.4.11. Package selector
2.4.12. Improved visual consistency
2.4.13. Guided Decision Tree Editor
2.4.14. Create Repository Wizard
2.4.15. Repository Structure Screen
2.5. New and Noteworthy in Integration 6.2.0
2.5.1. KIE Execution Server
2.6. What is New and Noteworthy in Drools 6.1.0
2.6.1. JMX support for KieScanner
2.7. New and Noteworthy in KIE Workbench 6.1.0
2.7.1. Data Modeler - round trip and source code preservation
2.7.2. Data Modeler - improved annotations
2.7.3. Standardization of the display of tabular data
2.7.4. Generation of modify(x) {...} blocks
2.8. New and Noteworthy in KIE API 6.0.0
2.8.1. New KIE name
2.8.2. Maven aligned projects and modules and Maven Deployment
2.8.3. Configuration and convention based projects
2.8.4. KieBase Inclusion
2.8.5. KieModules, KieContainer and KIE-CI
2.8.6. KieScanner
2.8.7. Hierarchical ClassLoader
2.8.8. Legacy API Adapter
2.8.9. KIE Documentation
2.9. What is New and Noteworthy in Drools 6.0.0
2.9.1. PHREAK - Lazy rule matching algorithm
2.9.2. Automatically firing timed rule in passive mode
2.9.3. Expression Timers
2.9.4. RuleFlowGroups and AgendaGroups are merged
2.10. New and Noteworthy in KIE Workbench 6.0.0
2.11. New and Noteworthy in Integration 6.0.0
2.11.1. CDI
2.11.2. Spring
2.11.3. Aries Blueprints
2.11.4. OSGi Ready
3. Compatibility matrix
II. KIE
4. KIE
4.1. Overview
4.1.1. Anatomy of Projects
4.1.2. Lifecycles
4.2. Build, Deploy, Utilize and Run
4.2.1. Introduction
4.2.2. Building
4.2.3. Deploying
4.2.4. Running
4.2.5. Installation and Deployment Cheat Sheets
4.2.6. Build, Deploy and Utilize Examples
4.3. Security
4.3.1. Security Manager
III. Drools Runtime and Language
5. Hybrid Reasoning
5.1. Artificial Intelligence
5.1.1. A Little History
5.1.2. Knowledge Representation and Reasoning
5.1.3. Rule Engines and Production Rule Systems (PRS)
5.1.4. Hybrid Reasoning Systems (HRS)
5.1.5. Expert Systems
5.1.6. Recommended Reading
5.2. Rete Algorithm
5.3. ReteOO Algorithm
5.4. PHREAK Algorithm
6. User Guide
6.1. The Basics
6.1.1. Stateless Knowledge Session
6.1.2. Stateful Knowledge Session
6.1.3. Methods versus Rules
6.1.4. Cross Products
6.2. Execution Control
6.2.1. Agenda
6.2.2. Rule Matches and Conflict Sets.
6.2.3. Declarative Agenda
6.3. Inference
6.3.1. Bus Pass Example
6.4. Truth Maintenance with Logical Objects
6.4.1. Overview
6.5. Decision Tables in Spreadsheets
6.5.1. When to Use Decision Tables
6.5.2. Overview
6.5.3. How Decision Tables Work
6.5.4. Spreadsheet Syntax
6.5.5. Creating and integrating Spreadsheet based Decision Tables
6.5.6. Managing Business Rules in Decision Tables
6.5.7. Rule Templates
6.6. Logging
7. Running
7.1. KieRuntime
7.1.1. EntryPoint
7.1.2. RuleRuntime
7.1.3. StatefulRuleSession
7.2. Agenda
7.2.1. Conflict Resolution
7.2.2. AgendaGroup
7.2.3. ActivationGroup
7.2.4. RuleFlowGroup
7.3. Event Model
7.4. StatelessKieSession
7.4.1. Sequential Mode
7.5. Propagation modes
7.6. Commands and the CommandExecutor
8. Rule Language Reference
8.1. Overview
8.1.1. A rule file
8.1.2. What makes a rule
8.2. Keywords
8.3. Comments
8.3.1. Single line comment
8.3.2. Multi-line comment
8.4. Error Messages
8.4.1. Message format
8.4.2. Error Messages Description
8.4.3. Other Messages
8.5. Package
8.5.1. import
8.5.2. global
8.6. Function
8.7. Type Declaration
8.7.1. Declaring New Types
8.7.2. Declaring Metadata
8.7.3. Declaring Metadata for Existing Types
8.7.4. Parametrized constructors for declared types
8.7.5. Non Typesafe Classes
8.7.6. Accessing Declared Types from the Application Code
8.7.7. Type Declaration 'extends'
8.7.8. Traits
8.8. Rule
8.8.1. Rule Attributes
8.8.2. Timers and Calendars
8.8.3. Left Hand Side (when) syntax
8.8.4. The Right Hand Side (then)
8.8.5. Conditional named consequences
8.8.6. A Note on Auto-boxing and Primitive Types
8.9. Query
8.10. Domain Specific Languages
8.10.1. When to Use a DSL
8.10.2. DSL Basics
8.10.3. Adding Constraints to Facts
8.10.4. Developing a DSL
8.10.5. DSL and DSLR Reference
9. Complex Event Processing
9.1. Complex Event Processing
9.2. Drools Fusion
9.3. Event Semantics
9.4. Event Processing Modes
9.4.1. Cloud Mode
9.4.2. Stream Mode
9.5. Session Clock
9.5.1. Available Clock Implementations
9.6. Sliding Windows
9.6.1. Sliding Time Windows
9.6.2. Sliding Length Windows
9.7. Streams Support
9.7.1. Declaring and Using Entry Points
9.8. Memory Management for Events
9.8.1. Explicit expiration offset
9.8.2. Inferred expiration offset
9.9. Temporal Reasoning
9.9.1. Temporal Operators
IV. Drools Integration
10. Drools Commands
10.1. API
10.1.1. XStream
10.1.2. JSON
10.1.3. JAXB
10.2. Commands supported
10.2.1. BatchExecutionCommand
10.2.2. InsertObjectCommand
10.2.3. RetractCommand
10.2.4. ModifyCommand
10.2.5. GetObjectCommand
10.2.6. InsertElementsCommand
10.2.7. FireAllRulesCommand
10.2.8. StartProcessCommand
10.2.9. SignalEventCommand
10.2.10. CompleteWorkItemCommand
10.2.11. AbortWorkItemCommand
10.2.12. QueryCommand
10.2.13. SetGlobalCommand
10.2.14. GetGlobalCommand
10.2.15. GetObjectsCommand
11. CDI
11.1. Introduction
11.2. Annotations
11.2.1. @KReleaseId
11.2.2. @KContainer
11.2.3. @KBase
11.2.4. @KSession for KieSession
11.2.5. @KSession for StatelessKieSession
11.3. API Example Comparison
12. Integration with Spring
12.1. Important Changes for Drools 6.0
12.2. Integration with Drools Expert
12.2.1. KieModule
12.2.2. KieBase
12.2.3. IMPORTANT NOTE
12.2.4. KieSessions
12.2.5. Kie:ReleaseId
12.2.6. Kie:Import
12.2.7. Annotations
12.2.8. Event Listeners
12.2.9. Loggers
12.2.10. Defining Batch Commands
12.2.11. Persistence
12.2.12. Leveraging Other Spring Features
12.3. Integration with jBPM Human Task
12.3.1. How to configure Spring with jBPM Human task
13. Apache Camel Integration
13.1. Camel
14. Drools Camel Server
14.1. Introduction
14.2. Deployment
14.3. Configuration
14.3.1. REST/Camel Services configuration
15. JMX monitoring with RHQ/JON
15.1. Introduction
15.1.1. Enabling JMX monitoring in a Drools application
15.1.2. Installing and running the RHQ/JON plugin
V. Drools Workbench
16. Workbench
16.1. Installation
16.1.1. War installation
16.1.2. Workbench data
16.1.3. System properties
16.2. Quick Start
16.2.1. Add repository
16.2.2. Add project
16.2.3. Define Data Model
16.2.4. Define Rule
16.2.5. Build and Deploy
16.3. Administration
16.3.1. Administration overview
16.3.2. Organizational unit
16.3.3. Repositories
16.4. Configuration
16.4.1. User management
16.4.2. Roles
16.4.3. Restricting access to repositories
16.4.4. Command line config tool
16.5. Introduction
16.5.1. Log in and log out
16.5.2. Home screen
16.5.3. Workbench concepts
16.5.4. Initial layout
16.6. Changing the layout
16.6.1. Resizing
16.6.2. Repositioning
16.7. Authoring
16.7.1. Artifact Repository
16.7.2. Asset Editor
16.7.3. Project Explorer
16.7.4. Project Editor
16.7.5. Validation
16.7.6. Data Modeller
16.7.7. Categories Editor
16.7.8. Data Sets
16.8. Embedding Workbench In Your Application
16.9. Asset Management
16.9.1. Asset Management Overview
16.9.2. Managed vs Unmanaged Repositories
16.9.3. Asset Management Processes
16.9.4. Usage Flow
16.9.5. Repository Structure
16.9.6. Managed Repositories Operations
16.9.7. Remote APIs
17. Authoring Assets
17.1. Creating a package
17.1.1. Empty package
17.1.2. Copy, Rename and Delete Packages
17.2. Business rules with the guided editor
17.2.1. Parts of the Guided Rule Editor
17.2.2. The "WHEN" (left-hand side) of a Rule
17.2.3. The "THEN" (right-hand side) of a Rule
17.2.4. Optional attributes
17.2.5. Pattern/Action toolbar
17.2.6. User driven drop down lists
17.2.7. Augmenting with DSL sentences
17.2.8. A more complex example:
17.3. Templates of assets/rules
17.3.1. Creating a rule template
17.3.2. Define the template
17.3.3. Defining the template data
17.3.4. Generated DRL
17.4. Guided decision tables (web based)
17.4.1. Types of decision table
17.4.2. Main components\concepts
17.4.3. Defining a web based decision table
17.4.4. Rule definition
17.4.5. Audit Log
17.4.6. Real Time Validation and Verification
17.5. Guided Decision Trees
17.5.1. The initial editor layout
17.5.2. First steps
17.5.3. Editing Data Object nodes
17.5.4. Editing Field Constraint nodes
17.5.5. Editing Action nodes
17.5.6. Managing the tree
17.6. Spreadsheet decision tables
17.7. Scorecards
17.7.1. (a) Setup Parameters
17.7.2. (b) Characteristics
17.8. Test Scenario
17.8.1. Knowledge Session Selector
17.8.2. Given Section
17.8.3. Expect Section
17.8.4. Global Section
17.8.5. New Input Section
17.9. Functions
17.10. DSL editor
17.11. Data enumerations (drop down list configurations)
17.11.1. Advanced enumeration concepts
17.12. Technical rules (DRL)
18. Workbench Integration
18.1. REST
18.1.1. Job calls
18.1.2. Repository calls
18.1.3. Organizational unit calls
18.1.4. Maven calls
18.1.5. REST summary
19. Workbench High Availability
19.1.
19.1.1. VFS clustering
19.1.2. jBPM clustering
VI. KIE Server
20. KIE Execution Server
20.1. Introduction
20.2. Installing the KIE Execution Server
20.2.1. Installation details for different containers
20.3. Registering a server
20.4. Creating a Kie Container
20.5. Managing Containers
20.5.1. Starting a Container
20.5.2. Stopping and Deleting a Container
20.5.3. Updating a Container
20.6. REST API
20.6.1. [GET] /
20.6.2. [POST] /
20.6.3. [GET] /containers
20.6.4. ⁠[GET] /containers/{id}
20.6.5. [PUT] /containers/{id}
20.6.6. [DELETE] /containers/{id}
20.6.7. [POST] /containers/{id}
20.6.8. [GET] /containers/{id}/release-id
20.6.9. [POST] /containers/{id}/release-id
20.6.10. [GET] /containers/{id}/scanner
20.6.11. [POST] /containers/{id}/scanner
20.6.12. Native REST client for Execution Server
VII. Drools Examples
21. Examples
21.1. Getting the Examples
21.2. Hello World
21.3. State Example
21.3.1. Understanding the State Example
21.4. Fibonacci Example
21.5. Banking Tutorial
21.6. Pricing Rule Decision Table Example
21.6.1. Executing the example
21.6.2. The decision table
21.7. Pet Store Example
21.8. Honest Politician Example
21.9. Sudoku Example
21.9.1. Sudoku Overview
21.9.2. Running the Example
21.9.3. Java Source and Rules Overview
21.9.4. Sudoku Validator Rules (validate.drl)
21.9.5. Sudoku Solving Rules (sudoku.drl)
21.10. Number Guess
21.11. Conway's Game Of Life
21.12. Invaders
21.12.1. Invaders1Main
21.12.2. Invaders2Main
21.12.3. Invaders3Main
21.12.4. Invaders4Main
21.12.5. Invaders5Main
21.12.6. Invaders6Main
21.12.7. Invaders4Main
21.13. Adventures with Drools
21.13.1. Using the game.
21.13.2. The code
21.14. Pong
21.15. Wumpus World
21.16. Miss Manners and Benchmarking
21.16.1. Introduction
21.16.2. In depth Discussion
21.16.3. Output Summary
21.17. Backward-Chaining
21.17.1. Backward-Chaining Systems
21.17.2. Cloning Transitive Closures
21.17.3. Defining a Query
21.17.4. Transitive Closure Example
21.17.5. Reactive Transitive Queries
21.17.6. Queries with Unbound Arguments
21.17.7. Multiple Unbound Arguments