JBoss.orgCommunity Documentation

Drools Documentation

Version 6.5.0.Final


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. What is New and Noteworthy in Drools 6.5.0
2.1.1. Configurable ThreadFactory
2.1.2. Use of any expressions as input for a query
2.1.3. Update with modified properties
2.1.4. Monitoring framework improvements
2.2. New and Noteworthy in KIE Workbench 6.5.0
2.2.1. Guided Rule Editor : Support formulae in composite field constraints
2.2.2. Authoring - Project Editor - Reimport button
2.3. What is New and Noteworthy in Drools 6.4.0
2.3.1. Better Java 8 compatibility
2.3.2. More robust incremental compilation
2.3.3. Improved multi-threading behaviour
2.3.4. OOPath improvements
2.4. New and Noteworthy in KIE Workbench 6.4.0
2.4.1. New look and feel
2.4.2. Various UI improvements
2.4.3. New locales
2.4.4. Authoring - Imports - Consistent terminology
2.4.5. Disable automatic build
2.4.6. Support for SCP style git Repository URLs
2.4.7. Authoring - Duplicate GAV detection
2.4.8. New Execution Server Management User Interface
2.4.9. User and group management
2.5. What is New and Noteworthy in Drools 6.3.0
2.5.1. Browsing graphs of objects with OOPath
2.5.2. Kie Navigator View for Eclipse
2.6. New and Noteworthy in KIE Workbench 6.3.0
2.6.1. Real Time Validation and Verification for the Decision Tables
2.6.2. Improved DRL Editor
2.6.3. Asset locking
2.6.4. Data Modeller Tool Windows
2.6.5. Generation of JPA enabled Data Models
2.6.6. Data Set Authoring
2.7. What is New and Noteworthy in Drools 6.2.0
2.7.1. Propagation modes
2.8. New and Noteworthy in KIE Workbench 6.2.0
2.8.1. Download Repository or Part of the Repository as a ZIP
2.8.2. Project Editor permissions
2.8.3. Unify validation style in Guided Decision Table Wizard.
2.8.4. Improved Wizards
2.8.5. Consistent behaviour of XLS, Guided Decision Tables and Guided Templates
2.8.6. Improved Metadata Tab
2.8.7. Improved Data Objects Editor
2.8.8. Execution Server Management UI
2.8.9. Social Activities
2.8.10. Contributors Dashboard
2.8.11. Package selector
2.8.12. Improved visual consistency
2.8.13. Guided Decision Tree Editor
2.8.14. Create Repository Wizard
2.8.15. Repository Structure Screen
2.9. New and Noteworthy in Integration 6.2.0
2.9.1. KIE Execution Server
2.10. What is New and Noteworthy in Drools 6.1.0
2.10.1. JMX support for KieScanner
2.11. New and Noteworthy in KIE Workbench 6.1.0
2.11.1. Data Modeler - round trip and source code preservation
2.11.2. Data Modeler - improved annotations
2.11.3. Standardization of the display of tabular data
2.11.4. Generation of modify(x) {...} blocks
2.12. New and Noteworthy in KIE API 6.0.0
2.12.1. New KIE name
2.12.2. Maven aligned projects and modules and Maven Deployment
2.12.3. Configuration and convention based projects
2.12.4. KieBase Inclusion
2.12.5. KieModules, KieContainer and KIE-CI
2.12.6. KieScanner
2.12.7. Hierarchical ClassLoader
2.12.8. Legacy API Adapter
2.12.9. KIE Documentation
2.13. What is New and Noteworthy in Drools 6.0.0
2.13.1. PHREAK - Lazy rule matching algorithm
2.13.2. Automatically firing timed rule in passive mode
2.13.3. Expression Timers
2.13.4. RuleFlowGroups and AgendaGroups are merged
2.14. New and Noteworthy in KIE Workbench 6.0.0
2.15. New and Noteworthy in Integration 6.0.0
2.15.1. CDI
2.15.2. Spring
2.15.3. Aries Blueprints
2.15.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.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. Rule Execution Modes
7.5.1. Passive Mode
7.5.2. Active Mode
7.6. Propagation modes
7.7. 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.6.3. Window Declaration
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
10. Experimental Features
10.1. Declarative Agenda
10.2. Browsing graphs of objects with OOPath
10.2.1. Reactive and Non-Reactive OOPath
IV. Drools Integration
11. Drools Commands
11.1. API
11.1.1. XStream
11.1.2. JSON
11.1.3. JAXB
11.2. Commands supported
11.2.1. BatchExecutionCommand
11.2.2. InsertObjectCommand
11.2.3. RetractCommand
11.2.4. ModifyCommand
11.2.5. GetObjectCommand
11.2.6. InsertElementsCommand
11.2.7. FireAllRulesCommand
11.2.8. StartProcessCommand
11.2.9. SignalEventCommand
11.2.10. CompleteWorkItemCommand
11.2.11. AbortWorkItemCommand
11.2.12. QueryCommand
11.2.13. SetGlobalCommand
11.2.14. GetGlobalCommand
11.2.15. GetObjectsCommand
12. CDI
12.1. Introduction
12.2. Annotations
12.2.1. @KReleaseId
12.2.2. @KContainer
12.2.3. @KBase
12.2.4. @KSession for KieSession
12.2.5. @KSession for StatelessKieSession
12.3. API Example Comparison
13. Integration with Spring
13.1. Important Changes for Drools 6.0
13.2. Integration with Drools Expert
13.2.1. KieModule
13.2.2. KieBase
13.2.3. IMPORTANT NOTE
13.2.4. KieSessions
13.2.5. Kie:ReleaseId
13.2.6. Kie:Import
13.2.7. Annotations
13.2.8. Event Listeners
13.2.9. Loggers
13.2.10. Defining Batch Commands
13.2.11. Persistence
13.2.12. Leveraging Other Spring Features
13.3. Integration with jBPM Human Task
13.3.1. How to configure Spring with jBPM Human task
14. Android Integration
14.1. Integration with Drools Expert
14.1.1. Pre-serialized Rules
14.1.2. KieContainer API with drools-compiler dependency
14.2. Integration with Roboguice
14.2.1. Pre-serialized Rules with Roboguice
14.2.2. KieContainer with drools-compiler dependency and Roboguice
15. Apache Camel Integration
15.1. Camel
16. Drools Camel Server
16.1. Introduction
16.2. Deployment
16.3. Configuration
16.3.1. REST/Camel Services configuration
17. JMX monitoring with RHQ/JON
17.1. Introduction
17.1.1. Enabling JMX monitoring in a Drools application
17.1.2. Installing and running the RHQ/JON plugin
V. Drools Workbench
18. Workbench (General)
18.1. Installation
18.1.1. War installation
18.1.2. Workbench data
18.1.3. System properties
18.1.4. Trouble shooting
18.2. Quick Start
18.2.1. Add repository
18.2.2. Add project
18.2.3. Define Data Model
18.2.4. Define Rule
18.2.5. Build and Deploy
18.3. Administration
18.3.1. Administration overview
18.3.2. Organizational unit
18.3.3. Repositories
18.4. Configuration
18.4.1. Basic user management
18.4.2. Roles
18.4.3. Restricting access to repositories
18.4.4. Command line config tool
18.5. Introduction
18.5.1. Log in and log out
18.5.2. Home screen
18.5.3. Workbench concepts
18.5.4. Initial layout
18.6. Changing the layout
18.6.1. Resizing
18.6.2. Repositioning
18.7. Authoring (General)
18.7.1. Artifact Repository
18.7.2. Asset Editor
18.7.3. Tags Editor
18.7.4. Project Explorer
18.7.5. Project Editor
18.7.6. Validation
18.7.7. Data Modeller
18.7.8. Data Sets
18.8. User and group management
18.8.1. Introduction
18.8.2. Security management providers
18.8.3. Installation and setup
18.8.4. Usage
18.9. Embedding Workbench In Your Application
18.10. Asset Management
18.10.1. Asset Management Overview
18.10.2. Managed vs Unmanaged Repositories
18.10.3. Asset Management Processes
18.10.4. Usage Flow
18.10.5. Repository Structure
18.10.6. Managed Repositories Operations
18.11. Execution Server Management UI
18.11.1. Server Templates
18.11.2. Container
18.11.3. Remote Server
19. Authoring Rule Assets
19.1. Creating a package
19.1.1. Empty package
19.1.2. Copy, Rename and Delete Packages
19.2. Business rules with the guided editor
19.2.1. Parts of the Guided Rule Editor
19.2.2. The "WHEN" (left-hand side) of a Rule
19.2.3. The "THEN" (right-hand side) of a Rule
19.2.4. Optional attributes
19.2.5. Pattern/Action toolbar
19.2.6. User driven drop down lists
19.2.7. Augmenting with DSL sentences
19.2.8. A more complex example:
19.3. Templates of assets/rules
19.3.1. Creating a rule template
19.3.2. Define the template
19.3.3. Defining the template data
19.3.4. Generated DRL
19.4. Guided decision tables (web based)
19.4.1. Types of decision table
19.4.2. Main components\concepts
19.4.3. Defining a web based decision table
19.4.4. Rule definition
19.4.5. Audit Log
19.4.6. Real Time Validation and Verification
19.5. Guided Decision Trees
19.5.1. The initial editor layout
19.5.2. First steps
19.5.3. Editing Data Object nodes
19.5.4. Editing Field Constraint nodes
19.5.5. Editing Action nodes
19.5.6. Managing the tree
19.6. Spreadsheet decision tables
19.7. Scorecards
19.7.1. (a) Setup Parameters
19.7.2. (b) Characteristics
19.8. Test Scenario
19.8.1. Knowledge Session Selector
19.8.2. Given Section
19.8.3. Expect Section
19.8.4. Global Section
19.8.5. New Input Section
19.9. Functions
19.10. DSL editor
19.11. Data enumerations (drop down list configurations)
19.11.1. Advanced enumeration concepts
19.12. Technical rules (DRL)
20. Workbench Integration
20.1. REST
20.1.1. Job calls
20.1.2. Repository calls
20.1.3. Organizational unit calls
20.1.4. Maven calls
20.1.5. REST summary
20.2. Keycloak SSO integration
20.2.1. Scenario
20.2.2. Install and setup a Keycloak server
20.2.3. Create and setup the demo realm
20.2.4. Install and setup jBPM Workbench
20.2.5. Securing workbench remote services via Keycloak
20.2.6. Securing workbench's file system services via Keycloak
20.2.7. Execution server
20.2.8. Consuming remote services
21. Workbench High Availability
21.1.
21.1.1. VFS clustering
21.1.2. jBPM clustering
VI. KIE Server
22. KIE Execution Server
22.1. Overview
22.1.1. Glossary
22.2. Installing the KIE Server
22.2.1. Bootstrap switches
22.2.2. Installation details for different containers
22.3. Kie Server setup
22.3.1. Managed Kie Server
22.3.2. Unmanaged KIE Execution Server
22.4. Creating a Kie Container
22.5. Managing Containers
22.5.1. Starting a Container
22.5.2. Stopping and Deleting a Container
22.5.3. Updating a Container
22.6. Kie Server REST API
22.6.1. [GET] /
22.6.2. [POST] /
22.6.3. [GET] /containers
22.6.4. ⁠[GET] /containers/{id}
22.6.5. [PUT] /containers/{id}
22.6.6. [DELETE] /containers/{id}
22.6.7. [POST] /containers/instances/{id}
22.6.8. [GET] /containers/{id}/release-id
22.6.9. [POST] /containers/{id}/release-id
22.6.10. [GET] /containers/{id}/scanner
22.6.11. [POST] /containers/{id}/scanner
22.6.12. Native REST client for Execution Server
22.7. OptaPlanner REST API
22.7.1. [GET] /containers/{containerId}/solvers
22.7.2. [PUT] /containers/{containerId}/solvers/{solverId}
22.7.3. [GET] /containers/{containerId}/solvers/{solverId}
22.7.4. [POST] /containers/{containerId}/solvers/{solverId}
22.7.5. [GET] /containers/{containerId}/solvers/{solverId}/bestsolution
22.7.6. [DELETE] /containers/{containerId}/solvers/{solverId}
22.8. Controller REST API
22.8.1. [GET] /management/servers
22.8.2. [GET] /management/server/{id}
22.8.3. [PUT] /management/server/{id}
22.8.4. [DELETE] /management/server/{id}
22.8.5. [GET] /management/server/{id}/containers
22.8.6. [GET] /management/server/{id}/containers/{containerId}
22.8.7. [PUT] /management/server/{id}/containers/{containerId}
22.8.8. [DELETE] /management/server/{id}/containers/{containerId}
22.8.9. [POST] /management/server/{id}/containers/{containerId}/status/started
22.8.10. [POST] /management/server/{id}/containers/{containerId}/status/stopped
22.9. Kie Server Java Client API
22.9.1. Maven Configuration
22.9.2. Client Configuration
22.9.3. Server Response
22.9.4. Server Capabilities
22.9.5. Kie Containers
22.9.6. Managing Containers
22.9.7. Available Clients for the Decision Server
22.9.8. Sending commands to the server
22.9.9. Listing available business processes
VII. Drools Examples
23. Examples
23.1. Getting the Examples
23.2. Hello World
23.3. State Example
23.3.1. Understanding the State Example
23.4. Fibonacci Example
23.5. Banking Tutorial
23.6. Pricing Rule Decision Table Example
23.6.1. Executing the example
23.6.2. The decision table
23.7. Pet Store Example
23.8. Honest Politician Example
23.9. Sudoku Example
23.9.1. Sudoku Overview
23.9.2. Running the Example
23.9.3. Java Source and Rules Overview
23.9.4. Sudoku Validator Rules (validate.drl)
23.9.5. Sudoku Solving Rules (sudoku.drl)
23.10. Number Guess
23.11. Conway's Game Of Life
23.12. Invaders
23.12.1. Invaders1Main
23.12.2. Invaders2Main
23.12.3. Invaders3Main
23.12.4. Invaders4Main
23.12.5. Invaders5Main
23.12.6. Invaders6Main
23.12.7. Invaders4Main
23.13. Adventures with Drools
23.13.1. Using the game.
23.13.2. The code
23.14. Pong
23.15. Wumpus World
23.16. Miss Manners and Benchmarking
23.16.1. Introduction
23.16.2. In depth Discussion
23.16.3. Output Summary
23.17. Backward-Chaining
23.17.1. Backward-Chaining Systems
23.17.2. Cloning Transitive Closures
23.17.3. Defining a Query
23.17.4. Transitive Closure Example
23.17.5. Reactive Transitive Queries
23.17.6. Queries with Unbound Arguments
23.17.7. Multiple Unbound Arguments