The OpenRulesTM Tutorials         Home  TOC   PREV TOP NEXT User's Guide
Divider

Rules Validation Tools

        OpenRules Eclipse Plug-In
        Batch Rules Validator

One of the main design rationale of OpenRules is an ability to catch as many rules errors as possible during design time vs. run-time when it is too late: an error in one rule like in programming code could potentially have catastrophic consequences.  OpenRules provides several tools for rules validation.

OpenRules Eclipse Plug-In

OpenRules utilizes the power of free open source Eclipse IDE by providing a built-in Plug-In that makes OpenRules projects a natural part of the Eclipse development environment.  Eclipse with the OpenRules plug-ins allows software developers to create and maintain complex Java projects with extensive rules components.  Eclipse Plug-in diagnoses any errors in Excel-files before you even deploy or start your OpenRules-based application.

OpenRules Plug-in automatically diagnoses errors in the Excel-files and displays the proper error messages inside Eclipse views like at the picture below:

To make sure that Eclipse control your OpenRules project, you have first to right-click to your project folder and "Add OpenRules Nature". You always can similarly "Remove OpenRules Nature".  To be validated, your main xls-files should be placed into an Eclipse source folder while all included files should be kept in regular folders (see  sections Business Rules Repository and Project Configuration).  OpenRules displays a diagnostic log with possible errors inside Eclipse Console.  The error messages include hyperlinks that will open the proper Excel file with a cursor located in a cell where the error occurred.

The OpenRules plug-in is automatically invoked when you make and save changes in you xls-files and then refresh the proper Eclipse project.  You always can invoke the plug-in from the Eclipse menu Project + Clean.

Besides error diagnostics, Eclipse naturally integrates OpenRules a built-in version control mechanism for both Excel-based rules and related source code files. 

Batch Rules Validator

If you are using a stand-alone version of OpenRules without Eclipse IDE, you still can validate your Excel-files.  Starting from the Release 3, OpenRules provides a special validation module, a batch Rules Validator, that allows you to test your main-xls files as long as all included (directly or indirectly) xls-files.  The Rules Validator is available as a special Ant target "compile.xls" included in the standard "build.xml" file attached to the most OpenRules examples.  The proper jar-file is named "com.openrules.java.eval.jar" and is located in openrules.config/lib.

You can invoke the Rules Validator by executing the standard Ant target "compile" from the provided build.xml file. It usually executes two targets "compile.java" and "compile.xls".   In Windows, you invoke the target "compile" by double-clicking on the file compile.bat.

 

 

►top

Divider