Release Notes 2.2.0
OpenRules Release 2.2.0 essentially simplifies OpenRules projects configuration and adds some new features requested by customers:
One default repository "openrules.config" for all necessary jar-files and build-files
One default language configuration "openrules.java" that supports both simple rule projects and web applications
One property file "com.openrules.properties" under One package "com.openrules" that defines all build and run-time properties
Release 2.2.0 also includes:
A new OpenRulesEngine that is used by simple Java applications along with complex web applications configured to work with different application servers like Tomcat or WebLogic and web development frameworks like Spring
Improved and better documented OpenRules API
New practical examples of dynamic rules-based web applications.
New changes will require some modifications
(mainly renaming) in the projects created using previous versions of OpenRules.
The document "MovingTo_2.2.0.txt"
describes how to move projects of different types to 2.2.0.
Below is a list of major changes introduced by OpenRules Release 2.2.0.
- New Main Configuration Project "openrules.config"
- Configuration files "openrules.properties" and "openrules.java.build.xml"
- Default Environment Table
- New OpenRulesEngine
- New Tomcat Server and Deployer
- Web Application Configuration
- Single Location for All Application Properties
- Improved API for OpenRules Forms
- Improved JSR-94 Reference Implementation
- New Sample Projects
- Fixed bugs and Delivery Changes
- Changes and Additions in User's Documentation
1. New Main Configuration Project "openrules.config"
The project "openrules.config" becomes the main
configuration project replacing project "lang.config" from previous OpenRules
versions. It includes all default jars and build files needed to build and run
The folder "openrules.config" contains all OpenRules jars in one place that is very convenient when you install OpenRules in your custom environment.
A stand-alone (non-Eclipse) version of OpenRules comes with all jars already placed into openrules.config directory.
An Eclipse-based version of OpenRules 2.2.0
still includes all necessary plugins to validate, compile, and run OpenRules
tables under Eclipse. After the plugin installation, you have to add "lib.ant"
project to your workspace and then add the main configuration project "openrules.config".
To copy all jars from just installed OpenRules plugins to the "openrules.config"
project, you have to run the target "build" from the build.xml file or just
double-click to build.bat.
2. Configuration files "openrules.properties" and "openrules.java.build.xml"
While the old "lang.config" included many build
and property files used during compile and run time, the new OpenRules release
mainly relies on only two files from the openrules.config folder:
File "openrules.properties" replaces the old file "openl.properties" and has a much simpler structure. Now it describes only two properties:
Because the release 2.2.0 uses the same language configuration "openrules.java" for both basic and web projects, the default "com.openrules.lang.xls.builderclass" is equal to
The default property "org.openl.builder.classpath"
points to the proper jars from openrules.config.
Ant file "openrules.java.build.xml" is used in run time and to create a custom version of the standard language configuration "openrules.java". A user can add application specific "java imports" to this file. This file executes the standard ant file "org.openl.j.build.com" that is located in the same folder
Note that you still can use other language configurations such as "openrules.xml". The folder openrules.config includes the proper build files.
All samples of pure rules projects in the standard OpenRules installation rely on the build files and jars located in the openrules.config. However, sample web applications rely on their own versions of openrules.properties and openrules.java.build.xml files located in their src directories. A user can always customize content and location of these configuration files (see details at http://openrules.com/docs/man_config.html).
3. Default Environment Table
Because OpenRules 2.2.0 uses the language
configuration "openrules.java" by default, there is no need to define an
Environment table with only one property "language" equal to "openrules.java".
However, if you want to use another language like "openrules.xml" and/or define
included Excel files, you still have to do it using an Environment table.
4. New OpenRulesEngine
Additionally to a simple XlsRuleEngine, the release 2.2.0 comes with a new rule engine known as "OpenRulesEngine". While it supports the basic API provided by XlsRuleEngine, OpenRulesEngine contains the following additional features:
- Controlled validation of changes in rules tables and automatic rules reloading upon new engine runs
- Use of an application class loader to locate Excel and ant files - it is especially important for a flexible configuration of web applications
- An ability to use environment variables like "openrulesBaseDir" and "openrulesConfigDir" to define custom locations of Excel and configuration files.
5. New Tomcat Server and Deployer
The release 2.2.0 does not use projects "deployed.tomcat",
"lib.tomcat", and "lib.tomcat.deployer" anymore. Instead, it includes only two
1) jakarta-tomcat: a slightly tuned version of the standard Tomcat v5.5.9
2) jakarta-tomcat-deployer: the standard Tomcat Deployer v5.5.9.
These changes are made in response to customers' complains that while the old Tomcat configuration was simple to use, it was difficult to understand how it can be transferred to a stand-alone server environment.
A new jakarta-tomcat folder is an exact copy of the standard Tomcat installation without complex dependencies of OpenRules plugins and lang.config directories. The only custom change is related to a start procedure (see STARTUP.bat and the target start.tomcat in build.xml) that simply adds openrules.config directory to the Tomcat's classpath.
All sample OpenRules web applications will be deployed into this jakarta-tomcat. All build procedures for the standard web applications use Ant files "build.xml" and "build.properties" that are based on the standard jakarta-tomcat-deployer builds. There are new examples that demonstrate how to add rules to a JSP-based applications using the standard jakarta-tomcat or an existing customer's server.
6. Web Application Configuration
By default we recommend to include files "openrules.properties"
and "openrules.java.build.xml" in the src directory of your web application. For
instance, all standard OpenRules projects such as HelloForms include these
files. The file "openrules.properties" additionally includes the property "openrules.config"
that specifies a relative path to the standard openrules.config directory. For
example, our deployed HelloForms application will consider the directory
as its base directory. Thus, file "openrules.properties" placed to this directory during build.and.deploy, will describe the location of openrules.config as:
Naturally, you may use any other location described here to prompt your application where to find OpenRules' configuration and jar files.
Another important point is a definition of a new JspFormsSession inside your web/index.jsp file. Now you have to use a parameter getClass() like in the following example:
ms = new JspFormsSession(getClass());
See the complete example at HelloForms/web/index.jsp.
Other small changes are described in the document "MovingTo_2.2.0.txt".
7. Single Location for All Application Properties
Previous releases of OpenRules used multiple
locations of property files that allow a user to customize its OpenRules
configurations. These files included:
The release 2.2.0 combined all these files into one file common for all language configurations:
Thus, in most cases you will create a new package "com.openrules" (or folder com/openrules) inside its src directory. Then you can place a flat file "com.openrules.properties" inside this package (folder). The names of properties from all old property files remain the same.
8. Improved API for OpenRules Forms
OpenRules 2.2.0 provides a better support for
Web GUI development with OpenRules Forms. It includes an improved
JspFormsSession and a new implementation of the IApplicationModel based on a new
OpenRulesEngine. See details at http://openrules.com/docs/man_api.html.
9. Improved JSR-94 Reference Implementation
OpenRules 2.2.0 improves its reference
implementation of the JSR-94 standard. We added to the project
"com.openrules.jsr94" an ability to define a rule engine outside of the
interface. In particular, you can create an instance of OpenRulesEngine with a
reference to your application' Class before you create a RuleExecutionSet. You
can pass this instance to the RuleExecutionSet
constructor using a map of properties. See an example of how it was done in the file GreetingEngine.java of a new sample project HelloJspJsr94.
10. Sample Projects
All sample projects were updated to reflect the
introduced changes. We also added several new sample projects:
- HelloTwoEngineRuns: a basic rules project that demonstrates how one engine can execute different rulesets from the same Excel file.
- HelloJsp: demonstrates how to create a simple web application with business logic in OpenRules and presentation logic in JSP. The application is deployed on jakarta-tomcat server that comes with OpenRules. It also explains how to deploy this application on an external tomcat server.
- HelloJspJsr94: similar to HelloJsp but uses OpenRules JSR-94 Interface to create and run OpenRulesEngine for a web application.
- LoanDynamics: a presentation-oriented web application that supports a dynamic loan approval process. Demonstrates an ability to dynamically add/delete/modify different securities related to an initial loan application. See details at http://openrules.com/LoanDynamics.htm
- StudentLoan: a dynamic web application that demonstrates an interactive product selection with rules and forms defined in OpenRules. Demonstrates how to create OpenRules tables with dynamic content.
As usual, all sample projects come accompanied by readme files.
11. Fixed bugs and Delivery Changes
The release 2.2.0 fixes several bugs found by
customers and testers, in particular it fixes errors in some logical operators
for org.openl.j. All changes and additions made in the included openl software
are documented in its source code. All new jar files included in the OpenRules
delivery now have a unified version number "2.2.0".
12. Changes in User's Documentation
The following sections of the user
documentation have been modified to reflect changes introduced in the Release
- Installation Guide
- Getting Started
- Project Configuration and Deployment.
A new section "OpenRules API" has been added.
OpenRules development team wants to thank all customers and colleagues who provided their valuable and constructive feedback.