The OpenRulesTM Tutorials         Home   PREV TOP NEXT User's Guide 

OpenRules Project Configuration [T]

    JDK and Eclipse Configuration
    Tomcat Configuration
    OpenRules Workspace

OpenRules Jars
OpenRules Build Files
Library of Convenience Java Tools
Library of Convenience OpenRules Forms
Custom Project Configuration
Main and Included OpenRules Files

JDK and Eclipse Configuration

OpenRules is designed to work without problems with any JDK starting from 1.4.  For this reason OpenRules does not use attractive Java-5 features and OpenRules jars can be invoked from any Java modules that work either under JDK 1.4, 1.5 or 1.6.  All sample build.xml files that have a target "" use options target="1.2" and source="1.3" to provide compatibility with JDK 1.4.  

When you install Eclipse 3.3 it will automatically use a JDK with compiler compliance level 5.0 (not 1.4!).  If you plan to use compliance level 1.4 you should go to Windows + Preferences + Compiler and set up the proper Compiler compliance level. 

Tomcat Configuration 

You may use a standard Apache Tomcat Server with any OpenRules-based application.  OpenRules is trying to minimize modifications in the standard Tomcat distribution.  To simplify the deployment of standard OpenRules projects we recommend to add  the "manager" role to the user "tomcat".  It allows a web application to establish connection as a Manager Application (responsible for remote web application deployment).  So,  in your Tomcat installation open the file conf/tomcat-users.xml and add the word "manager" as follows:

    <user name="tomcat" password="tomcat" roles="tomcat,manager" />

Notes about Security. Running an application server on Internet-connected computer poses a security risk. By default, standard Tomcat server allows to establish connection to the Manager Application from any location.  We recommend to limit an access to the Manager Application only from localhost (see and to change login and password values in file conf/tomcat-users.xml.  Simplicity of building Web applications with OpenRules should not mislead a user to a conclusion that administration of the Web server itself becomes easier too.  It is highly recommended to get a deep understanding of security issues before you expose your server to the external world.  Both Apache Tomcat Server and Apache Axis come with detailed documentation devoted to the security topic.

OpenRules Workspace

Whether you have OpenRules installed as a Standalone system or as an Eclipse-based framework, the structure of your OpenRules workspace is the same and is described here.  It consists of one optional configuration project "openrules.config" that includes all OpenRules jars and some convenience build-files.  A typical view of the Eclipse workspace with OpenRules projects is presented below:

OpenRules Jars  ►top

The folder "openrules.config" project is a simple placeholder for all OpenRules jar-files and related 3rd party jar-files. They are located in the subdirectory "lib".   There are only there jars files that include OpenRules specific software:
  1. openrules.all.jar

You will definitely need that contains all necessary OpenRules classes. The is needed if you use an optional library of convenience Java methods.  It is used by many sample projects.  The is needed only if you want to add a batch rules validator to your non-Eclipse projects.  All other jars inside openrules.config/lib are commonly available under Open Source licenses.  There are a few build-files inside openrules.config that are used for the convenience of OpenRules sample projects but you do not need them in run-time.  The build.xml file with a few targets used to compile, validate and run standard projects.  All standard sample projects depend on openrules.config project.  However, you do not need this project if you copy all jars to you own directory and properly adjust your build-files.

There is one more optional library com.openrules.pdf.jar  that is needed only if you use OpenRules Forms and want to automatically generate PDF files.  Besides a minimal OpenRules configuration includes the following Apache jars:

All other jars are standard 3rd party jar-files that you may or may not need.  The following jars are required if you use OpenRules Forms:

If you use xml files to define OpenRules data types, you may also need the following jars:

You may use different versions of these commonly used open source tools. 

Build Files  ►top

The folder openrules.config includes the Ant file build.xml with the following targets:

Library of Convenience Java Tools  ►top

The project is an optional library of Java convenience classes.  It contains Java classes with predefined methods shared by different OpenRules-based projects:

This project is a place where OpenRules and its customers contribute commonly used classes and methods.  The library comes with all sources included to be easily understood, modified or extended by customers.

Library of Convenience OpenRules Forms  ►top

The folder openrules.forms.lib is an optional library to support Web applications that use OpenRules Forms.  It provide Excel files that support typical interaction constructions, layouts and layout elements, and predefined data types.

Custom Project Configuration ►top

The following table describes a typical OpenRules project configuration:

Recommended Folder/File Name Type Required or Optional  Description
/src Source Folder Optional A placeholder for Java packages (if any)
/rules Folder Required A root for a business root directory. The name "rules" can be changed
/rules/main Source Folder Required A placeholder for OpenRules main Excel files.  The name "main" can be changed
/rules/include Folder Optional A placeholder for Excel files included in the main file (optional)
/bin Output Folder Optional Compiled Java classes (optional)
/war Folder Optional A placeholder for web components (optional)
/gen Source Folder Optional A placeholder for the generated Java files used by Web Services
/build.xml Ant build file Required The standard build-files provided by OpenRules to build and run rules applications
/ Property file Optional These files specify properties used to build, deploy and launch applications
/compile.bat Batch file Optional Use to compile Java files and validate Excel-files
/build.bat Batch file Optional Use to build Web applications (uses the target "build" from build.xml)
/deploy.bat Batch file Optional Use to deploy Web applications (uses the target "deploy" from build.xml)
/run.bat Batch file Optional Use to run Java applications under Windows (uses the target "run" from build.xml)
/run.html HTML file Optional Use to start a Web client for presentation-oriented web applications

OpenRules provides default project configurations MyRules and MyWeb that may be sufficient for many practical projects.  You also may use many OpenRules sample as templates for your own projects. 

Main and Included OpenRules Files   ►top

The main OpenRules file is an Excel file which serves as the root for any OpenRules application.  Main xls-files are standalone compile units which therefore must be located in the Source Folders (under Eclipse).  We recommend placing main xls-files in a separate source folder within a regular root folder such as "rules/main".  However, you may use any other name as long as this folder is of type "Source Folder".  It is needed only to allow OpenRules Eclipse Plug-in to automatically recognize and validate xls-files.  Errors in Excel files within source folders are immediately displayed in the Eclipse panel "Problems" and "Console".

The main Excel file may include an Environment table that describes all related Excel-files and Java/XML classes and methods needed for your OpenRules projects. Click here to learn the details of Business Rules Repository organization.

NOTE. The previous OpenRules releases included many configuration and property files that became obsolete after the introduction of the OpenRules-3.  See the document "Moving To OpenRules-3" for details.