Download Samples

Download OpenRules Samples.  You may freely download various samples of OpenRules decision projects located in the following workspaces:

Extract (unzip) the downloaded files and you will get the folder “OpenRulesSamples” on your hard-drive. This folder contain multiple sub-folders (“projects”) with examples of OpenRules decision models. Analyzing and executing these projects you will learn how they are organized, how to build, test, and deploy them, and finally how to develop your own operational decision models. See the description of a simple examples.

You may also download examples of decision optimization models from Rule Solver and machine learning models from Rule Learner.

Decision Model Organization. Many examples are organized similarly to the project “PatientTherapy”:

The folder “rules” serves as a rule repository. It usually contains 4 Excel files:

    • DecisionModel.xls  that describes the structure of the project in the table “Environment”
    • Glossary.xls that describes the glossary of this decision model
    • Rules.xls that describes business logic implemented using decision models and other forms of business rules
    • Test.xls that defined test cases.

Another important component is file “project.properties” that for the project “PatientTherapy” look as follows:

Each project also includes a configuration file “pom.xml“. When you install OpenRules for the first time, you don’t have to look inside this file. But if you create your own project based on the standard project, you need to make sure that this file contains the correct artifactId and openrules.version, e.g.

Build and Test Decision Models. To run downloaded samples you need to have OpenRules Decision Manager to be installed on your machine. You can build and test a decision model by a simple double-click on the file “test.bat“.  For Mac or Linux, use the script-file “test“. When you try it for the first time, you may need to confirm that it’s safe to execute this script. If you make any changes in your Excel tables or configuration files, it will automatically re-build the model before running its tests. If OpenRules finds any errors, it will display them using the business terms pointing to the corresponding places in your Excel files.

After the successful build, “test.bat” will execute test-cases described in the file “Test.xls”.  When you execute the decision model, the Decision Manager produces a user-friendly execution protocol and explanation reports in the HTML format in the generated folder “report“.

Some decision models (e.g. HelloJava) use data instances created not in Excel but using the existing Java classes.  You may do all work within the folder “OpenRulesSamples” using the standard File Manager – no technical knowledge is required. Technical people may import all projects into their favorite IDE such as Eclipse.

Building Your Own Models. You can choose any sample decision model as a prototype of your own decision model. Let’s say you want to create a decision model “MyModel” based on the provided decision model “VacationDays”. Copy the folder “VacationDays” to some place on your hard-drive under the name “MyModel”. In the file “MyModel/pom.xml” change <artifactId>VacationDays</artifactId> to <artifactId>MyModel</artifactId>.  You are ready to make changes in the files “Glossary.xls”, “Rules.xls”,  and “Test.xls” to introduce your own business concepts, rules, and test cases.  Run “test.bat” to build and test your model.

You can deploy your decision models on-premise or on cloud using your preferable deployment options: AWS Lambda functions, RESTful Web Services, or Docker images. Wherever you deploy your decision model, every execution of this service will be reported to the AWS Marketplace metering service. Based on your actual number of executions and the above Pricing, AWS Marketplace will provide you with accurate monthly bills. All charges will go through AWS and you have an option to cancel your AWS subscription at anytime and switch to OpenRules yearly subscription.