Book Image

Mastering JBoss Drools 6

By : Mariano De Maio, Mauricio Salatino, Esteban Aliverti
Book Image

Mastering JBoss Drools 6

By: Mariano De Maio, Mauricio Salatino, Esteban Aliverti

Overview of this book

Mastering JBoss Drools 6 will provide you with the knowledge to develop applications involving complex scenarios. You will learn how to use KIE modules to create and execute Business Rules, and how the PHREAK algorithm internally works to drive the Rule Engine decisions. This book will also cover the relationship between Drools and jBPM, which allows you to enrich your applications by using Business Processes. You will be briefly introduced to the concept of complex event processing (Drools CEP) where you will learn how to aggregate and correlate your data based on temporal conditions. You will also learn how to define rules using domain-specific languages, such as spreadsheets, database entries, PMML, and more. Towards the end, this book will take you through the integration of Drools with the Spring and Camel frameworks for more complex applications.
Table of Contents (18 chapters)
Mastering JBoss Drools 6
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Preface
Index

Drools and beyond: extending our functionality


We've seen in this chapter, and throughout the whole book, a lot of different ways to use Drools. Whether we use it as an embedded library, a service, or a closed product, the main goal is to enable our applications to grow in a manageable way. We must consider our design, inside and around business rules, to achieve this. We will try to cover a few tricks that have facilitated growing our Business Rule-enabled applications in the past.

One of the first extensions of functionality we've seen for Drools components has been global variables. If we define them as interfaces or abstract classes, we can define them by using different classes for different runtime components (that is, test cases, local versus QA, or production environments, and so on). They are a very simple way of providing ease of extensibility because of their pluggable nature.

Global variables also provide a very useful feature that sometimes gets overused; because we can keep a...