Open Your Business Rules!                     
Rules-based Operational Decision Services

Release Notes 8.0.0 (August-2019)

OpenRules Release 8.0.0 is a major release that along with the essential improvements in the classical version of OpenRules BRDMS introduces a completely new product called OpenRules Decision Manager available from www.OpenRulesDecisionManager.com. So, from now on OpenRules, Inc. will support two products:
 
  • Classic OpenRules BRDMS that, being in real-world production environments for many major organizations worldwide for 15+ years, continues to be a highy efficient and reliable product with proven records;
  • New OpenRules Decision Manager that has been developed specifically for modern enterprises allowing them to create, deploy, and manage Business Decision Services on cloud, on premise, or even on smartphones. It comes with a completely new execution mechanism that is extremely fast, takes almost no time to start, and essentially reduces the memory footprint. It perfectly fits the requirements of modern containerized decision microservices. You may try it from here.
It is important that both products can efficiently execute the same Business Decision Models created using MS Excel or Google Sheets in accordance with OpenRules Goal-Oriented Decision Modeling approach described in this book.


The latest advances in the Classic OpenRules BRDMS include the following features:

- New tutorial for Decision Microservices
- Simplified API with Explicit Use of Goals
- Automatic generation of Java interfaces for already tested decision models
- Support for Horizontal decision tables (rules are listed from right to left). OpenRules will automatically recognize the decision table's orientation
- Simplied standard batch files.

New Tutorial "Creating OpenRules Decision Microservices with Maven, SpringBoot, and Docker" and the Corresponsing Workspace

This tutorial explain in a step-by-step manner what you need to do to create, test, and deploy an OpenRules-based decision microservice using Maven, SpringBoot and Docker. It's available for free downloads - click here. The tutorial is accompanied by the workspace "openrules.services" with all described examples - it is now available for download along with the evaluation version.

Simplified API with Explicit Use of Goals

This release comes with a new, very simple Java API for invocation of OpenRules decision models. We explicitly introduced Java concept "Goal" to support the Goal-Oriented Decision Modeling approach described in this book that the book has been updated as well. Here is what you should usually do:


  • Create an instance of the class DecisionModel, e.g.
    DecisionModel model = new DecisionModel("file:rules/Goals.xls");
  • Ask the model to create an instance of the class Goal, e.g.
    Goal goal = model.createGoal(“Vacations Days”);
  • Tell the goal to use your own business objects, e.g.
    goal.use(“Employee”,employee);
  • Execute the goal using the standard Goal’s method
    goal.execute();

 

 For example, you may execute the standard decision model "VacationDays" using the following code:
-------------------------------------------------------------------------------------------
  DecisionModel model = new DecisionModel("file:rules/Goals.xls");
  Goal goal = model.createGoal("Vacation Days");
  Employee employee = new Employee();
  employee.setId("Robinson");
  employee.setAge(57);
  employee.setService(30);
  goal.use("Employee", employee);
  goal.execute();
  model.log("Results: " + employee);

-------------------------------------------------------------------------------------------
Now, when you use goal.use("Employee", employee) instead of  goal.put("Employee", employee), you don't need anymore to specify a table of the type "DecisionObject".
 
If you want to test your decision model from Java using test-cases defined in the file "Test.xls", you can do it with these 3 lines of Java code:
------------------------------------------------------------------------------------------
  DecisionModel model = new DecisionModel("file:rules/Test.xls");
  Goal goal = model.createGoal("Vacation Days");
  goal.test();

------------------------------------------------------------------------------------------

The majority of sample-projects in the downloadable workspace "openrules.models" has been modified to show the use of this new API.

Changes in Standard Batch Files

Previously sample projects in the workspace "openrules.models" contained two batch files:

* build.bat - to build the model (by generating an execution path in the file Goals.xls)
* run.bat - to excute the model (using the file Test.xls).
Now you need to adjust only one file
* settings.bat - to set the key parameters of your decision model.
For example, here is the file "settings.bat" for the decision model "VacationDays":
------------------------------------------------------------
  set GOAL_NAME="Vacation Days"
  set MODEL_FILE=rules/DecisionModel.xls
  set GOAL_FILE=rules/Goals.xls
  set TEST_FILE=rules/Test.xls
  set FEEL=On

------------------------------------------------------------
So, now all sample projects use the same batch files "build.bat" and "run.bat" as they refer to the project specific file "settings.bat".  We recommend you to modify your old batch-files using new settings. However, the old settings will also continue to work as we made the proper changes in the standard files "projectBuild.bat" and "projectRun.bat" inside "openrules.config".

Horizontal Decision Tables

By default, all OpenRules decision tables were vertical: rules are listed from top to bottom. Based on customer requests, we now also support for horizontal decision tables when rules are listed from left to right. So, now you have a choice between these equivalent representations of the same decision logic:

Vertical:


Horizontal:


To move from one format to another you may simply use Excel's Copy+Paste Special+Transpose. No other changes are required as OpenRules will automatically recognize the decision table's orientation.

Automatic Generation of Java Interfaces for already Tested Decision Models

We added an ability to generate Java classes that provide ready-to-go interfaces for already tested decision models. For example, the standard decision model "CreditCardApplication" can be tested using this Java launcher:



It executes all "testCases" defined in the file "Test.xls" using Datatype and Data tables to define applicants and applications.
However, after a decision model has been tested by business people, they hand it to developers for integration with production-level applications. The developers usually have to manually create Java classes using the attributes from the 3rd column of the glossary and whose types are defined in the corresponding Datatype tables.

Now OpenRules can generate these Java classes automatically! To do this, you need to do two things:

1) Add two more settings to the file "settings.bat":
    ------------------------------------------------------------
    set GOAL_NAME="Application Status"
    set MODEL_FILE=rules/DecisionModel.xls
    set GOAL_FILE=rules/Goals.xls
    set TEST_FILE=rules/Test.xls
    set FEEL=On
    set PACKAGE_NAME=credit.card.application
    set OUTPUT_FOLDER
=src
---------------------------------------------------------------


2) Double click on the new standard batch file "generate.bat".

It will generate the following interface classes inside the folder src/credit/card/application/:

  • Applicant.java - an interface for the business concept Applicant
  • ApplicantImpl.java - an implementation of the interface Applicant
  • Application.java - an interface for the business concept Application
  • ApplicationImpl.java - an implementation of the interface Application

They define attributes and their getters/setters for all decision variables from the Glossary. To make sure that the same decision model will continue to work with the generated Java interface, you can create a Java launcher that may look as below:



Pay attention that instead of the file "Test.xls" this launcher uses the file "Goals.xls". The actual production interface may look similarly just your objects such as Application and Applicant will come from your technical infrastructure.

Changes in the OpenRules Configuration

The standard OpenRules configuration is available as the folder "openrules.config". We made the following changes in files inside this folder:
1) Simplified and optimized various template tables in the files "DecisionTemplates.xls" and "DecisionTableExecuteTemplates.xls"
2) Modified batch file "projectBuild.bat" and "projectRun.bat"
3) Added a new batch file "projectGenerate.bat"
4) Updated jar-file in the subfolder "lib".

While you need to update your folder "openrules.config", these changes will not affect your existing decision projects which should continue to work fine even if you wouldn't change them.

 

Download the latest complete OpenRules release 8.0.0 from here.

If you have any questions, comments or suggestions, please post them at the Google Discussion Group or send them directly to support@openrules.com

 

Top