Rules are everywhere and represent the most natural way for analysts and domain experts to formalize the business logic of their area of competence. A marketing manager can determine in this way the discount rules maximizing the income of a travel agency. A doctor can use them to diagnose a disease based on the presence or absence of certain symptoms. A labor consultant can regulate under which circumstances a worker can ask for retirement and with which compensation. A linguist can catalogue the words in a natural language sentence to produce a sentiment analysis tool. A bank accountant can establish which criteria an applicant should satisfy to get a mortgage. All these scenarios can be naturally translated into rules. The possibilities and range of applicability are basically infinite.
Drools is a rule engine, the upstream project powering Red Hat Decision Manager, and a business rule management system that allows to define and efficiently evaluate and execute rules in a declarative way such as "when A then B". Using this sort of rules, instead of an imperative programming language, not only has the advantage of making the business logic much easier to understand and enabling business analysts to write, modify, verify and validate it. It even improves the maintainability of the knowledge base and makes it easier to deal with its evolving complexity: modifying a rule and determining the impact of these changes on the rest of the application is relatively straightforward. This approach also promotes modularity, since each rule models an isolated and small portion of the business logic and is not part of a monolithic program. Finally it provides a clear separation of the business logic from the rest of the infrastructural and architectural code of your application. This is relevant especially considering that typically they have a totally different lifecycle: the validity of a marketing rule can last even only a few hours while the architecture of your software application is designed to last for years.
The Decision Model and Notation (DMN™) is a Standard by OMG© providing a common and visual notation readily understandable by all users and personas.
Drools is an open source DMN engine written in Java™, providing full runtime support for DMN models at Conformance level 3, meaning 100% of the features in the Standard.