Decision Intelligence Platform

Learn by Examples

OpenRules allows business users (subject matter experts with no programming experience) to create, test, and maintain operational decision models.  The best way to learn how to create your own decision models is to analyze existing examples.

After OpenRules installation (evaluation or commercial), you will find many examples of decision models in the folder “openrules.samples“. These decision models are organized into the following subfolders, each focusing on specific decision modeling capabilities.

INTRO: A collection of simple, introductory decision models accompanied by detailed explanations.

  • Hello: defines how to greet a customer based on the time of day, gender, and marital status
  • PatientTherapy: specifies decision logic for helping a doctor to determine a patient’s therapy
  • UpSellRules: demonstrates how to deal with arrays of objects using relatively complex up-sell rules
  • Vacation Days: determines the number of vacation days assigned to an employee based on age and years of service
  • Iterations: demonstrates how to iterate over an array of employees to determine the minimum or maximum salaries, the total number of children, all locations where the employees live, and similar requests.

ITERATIONS: decision models that deal with arrays/lists of objects and various iterations over them. Read the User Manual, p. 89, and this post.

MATCHING: decision models with complex matching conditions and regular expressions. Read more.

CSV: decision models accessing data from large CSV files. Read more here and here.

DEPLOYMENT: demonstrate different deployment and integration options for the same decision model, “Vacation Days“.

DB: decision models that demonstrate the use of Rule DB™, an OpenRules component that supports connectivity with relational databases. Read these posts: Accessing Database from Business Rules, SoldierPayments, Big Decision Tables

ARCHITECTURE: decision models that demonstrate how to build Enterprise-Level Rules Repositories. See how it can be done in the sample “Loan Services“.

AI: decision models deployed as AI Agents using MCP Servers and running from LLMs

LOAN: decision models related to loan origination. The most complex sample is Loan Services.

SORT: decision models that demonstrate how to sort collections of objects. See also

TEMPLATES: domain-specific decision table templates

ADVANCED: more complex decision models, such as:

  • 1040EZ: tax calculation
  • FlightRebooking: reschedules passengers from a canceled flight
  • InsurancePremium: calculates the insurance premium for an automobile policy
  • OrderPromotion: defines promotions for different sales orders
  • SelectingUniversityDegrees: describes a decision service that allows a student to select all necessary university courses to receive a desired degree.

MISC: miscellaneous decision models.

Sample decision models for RuleSolver and RuleLearner have been included in their standard installations.

You can use the provided decision models to create your own models by switching to your own decision variables and business rules. OpenRules also provides a User Manual for Business that addresses many of the above topics and doesn’t require any preliminary knowledge.