Book Image

Drools JBoss Rules 5.X Developer's Guide

By : Michal Bali
Book Image

Drools JBoss Rules 5.X Developer's Guide

By: Michal Bali

Overview of this book

<p>Writing business rules has always been a challenging task. Business rules tend to change often leading to a maintenance nightmare. This book shows you various ways to code your business rules using Drools, the open source Business Rules Management System.<br /><br />Drools JBoss Rules 5.X Developer's Guide shows various features of the Drools platform by walking the reader through several real-world examples. Each chapter elaborates on different aspects of the Drools platform. The reader will also learn about the inner workings of Drools and its implementation of the Rete algorithm.<br /><br />The book starts with explaining rule basics, then builds on this information by going through various areas like human readable rules, rules for validation, and stateful rules, using examples from the banking domain. A loan approval process example shows the use of the jBPM module. Parts of a banking fraud detection system are implemented with the Drools Fusion module which is the complex event processing part of Drools. Finally, more technical details are shown detailing the inner workings of Drools, the implementation of the ReteOO algorithm, indexing, node sharing, and partitioning.</p>
Table of Contents (22 chapters)
Drools JBoss Rules 5.X Developer's Guide
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Setting Up the Development Environment
Creating Custom Operators
Dependencies of Sample Application
Index

Drools


Drools is a Business Logic integration Platform (BliP). It is written in Java. It is an open source project that is backed by JBoss and Red Hat, Inc. It is licensed under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.html). This book will focus on Version 5.5 of this platform that was released in November 2012.

Work on Drools (the rule engine) began in 2001. From its beginning Drools underwent many changes. Drools 1.0 started with a brute force linear search. It was then rewritten in Version 2.0, which was based on the Rete algorithm. The Rete algorithm boosted Drools' performance. Rules were written mainly in XML. The next Version 3.0 introduced a new .drl format. This is a domain-specific language specially crafted for writing rules. It proved to be a great success and it became the main format for writing rules. Version 4.0 of the rule engine had some major performance improvements together with first release of Business Rules Management System (BRMS). This formed the base for the next big release 5.0, where Drools became a BliP. The platform consists of four main modules:

  • Drools Expert: This is a rule engine itself.

  • Drools Fusion: This is a complex event processing (CEP) module. It is will be covered in Chapter 7, Complex Event Processing.

  • jBPM: Workflow combines rules and processes together. It will be introduced at the end of Chapter 5, Creating Human-readable Rules and then fully covered in Chapter 8, Defining Processes with jBPM.

  • Drools Guvnor: This is a BRMS. It won't be covered in this book except for testing and rule analysis in Chapter 10, Testing.

Drools has several optional modules. For example, OptaPlanner for solving planning problems or Drools Chance that adds uncertainty support. Another very important part of Drools is its Eclipse plugin.

Drools has a very active and friendly community. It is growing with every year. You can get in touch by visiting the Drools blog, wiki, or the mailing lists. For more information please visit the Drools website at http://www.jboss.org/drools/.