API for Generation of OpenRules Decision Tables in Excel

With a new release 6.2.6 of OpenRules® you may generate Excel files with multiple decision tables using a simple Java API. It includes class DecisionBook that corresponds to one Excel workbook (an xls-file), to which you may add multiple OpenRules® decision tables.  DecisionBook provides the following public method:





For example, the following code


will create the following table in the “decisionBook”:


Similarly you may add many more single-hit and multi-hit decision tables using different decision templates defined by the second parameter.  Each new decision table will be placed in a separate worksheet.

At the end you simply save this decision book as an Excel file like in the following statement:


This new API was created based on real-world needs of our customers: actually we generalized a mechanism that our consultants have been using in their practice for a while. In particular, programmatic generation of decision tables can be very useful when new decision tables are automatically discovered based on historical data using various machine learning algorithms.  For example, our Rule Learner has been successfully used by IRS to generate Excel-based decision tables that may identify non-compliant activities.  It kills two birds from one stone: on the one hand business analysts may understand, analyze and make changes in the automatically  generated decision tables. On the other hand, these decision tables are also machine readable and can be executed by the OpenRules rule engine.

By the way, along with Excel file, Rule Learner also may generate decision tables in the PMML format – a feature that will be added to the standard OpenRules API in the nearest future.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.