DTRules is a Decision Table based Rules Engine. DTRules is an independent implementation of an approach to building Policy based applications which has been proven in three separate implementations. The first implementation was used to implement the STARS eligibility screener for the Texas Health and Human Services Commission (HHSC) by AMS.

The second implementation was used to implement policy for the Texas Integrated Eligibility Redesign System (TIERS). This implementation drew on the STARS implementation, and was extended to handle the roughly 3000 decision tables used to define eligibility policy for HHSC programs in Texas.

The third implementation was used to implement OFAST, a set of auditing applications for the Ohio Department of Taxation in order to do corporate audits. This complete rewrite of the Decision Table based Rules Engine added implementations of contexts, UI Entities, and Events allowing each audit application to be coded completely using Decision Tables.

DTRules is a completely independent implementation of a Decision Table based Rules Engine suitable for licensing under the LGPL. It shares no source with any of these previous implementations of Decision Table based Rules Engines, and includes a number of performance enhancements absent from these previous implementations. Additionally, DTRules will be JSR 94 compliant.

A Decision Table based Rules Engine (like DTRules) implements and validates policy using:

  • Decision Tables
  • Entity Description Dictionary
  • Extendable (Domain Specific) Formal Language compiler
  • Postfix Interpreter
  • Decision Table Editor
  • Automated Regression and Trace facility for policy analysis

A DTRules is very different from the typical forward chaining or backward chaining rules engine. DTRules is optimized for evaluating policy using a formal syntax which closely matches the syntax used to define policy. Furthermore, the Decision Table structure used to organize rules in DTRules allows the conditions and actions to be structured and executed exactly as they are expressed. Thus the scheduling and evaluation of rules is specified by the decision tables themselves, and not by some scheduling algorithm.

DTRules utilizes strongly the typed data in its Entities to organize the “facts”. Entities are defined to have a fixed set of typed attributes, with default values. Entities can contain references and lists of references to other Entities. As a result, data sets expressed in relational databases, XML, etc. can be mapped to structures within DTRules which closely resemble their sources. The conditions and actions within a decision table can leverage the structured nature of the facts within the knowledge base.

The Extendable Formal Language compiler allows policy to be expressed using language that closely mirrors the language within the policy being automated. The Formal Language compiler is used to process the Decision Tables prior to deployment, which allows the compiler to be extended and regression tested against the complete set of existing decision tables to ensure no existing syntax is broken by new syntax added to the compiler.

The Postfix Interpreter implements an Entity Stack which closely resembles the Dictionary Stack in PostScript to provide scoping for the policy within a decision table. This allows decision tables to evaluate some policy question on an entity (such as an individual), and allows a calling decision table to evaluate policy “for all individuals on the application.” Expressing policy in this way closely matches the way policy is written, and makes validation by Policy Experts a straight forward exercise.

The Decision Table Editor provides an integrated view on the set of Decision Tables and Entity Description Dictionary for a rule set supported by DTRules. The Decision Table Editor will be integrated with Eclipse, and will provide a facility to load trace files for scenario based analysis of decision tables. Two such tools exist today for both the TIERS system in Texas, and the OFAST system in Ohio.

The Trace facility allows a Rule Set to be analyzed for coverage analysis, decision point analysis, and (potentially) for change analysis.