OpenRules integrates JSR-331 with BRMS

OpenRules has announced that its redesigned Rule Solver™ is now JSR-331 compliant.  Rule Solver is a long-time available optimization component of OpenRules® BRMS that allows users to define and solve constraint satisfaction and optimization problems within a business rules environment.

Rule Solverincludes JSR-331 based templates that allow business analysts to define their CSPs directly in Excel. For example, here is a rules table that defines a Sudoku problem:

An Excel user with simple copy-pastes defines rows, columns, and blocks. The rules table “postSudokuConstraints”with one AlDiff constraint does the entire work.

While JSR-331 does not include (yet!) a scheduling component, OpenRules added a simple package “javax.constraints.scheduler” that extends JSR-331 to handle scheduling and resource allocation problems.  It allows a user to express a scheduling problem in terms of activities and resources.  Activities may have unknown start, duration and end. Activities may require or produce different resources. Resources may have different types (e.g. recoverable like humans or consumable like money) and their limited capacities may vary over time. The package includes major temporal and capacity constraints specified in accordance with the JSR-331 requirements.

Rule Solverincludes OpenRules-based templates for scheduling problems. For example, let’s consider 5 different orders (activities) that fire batches of bricks in the oven (a resource with limited capacities). Each order requires certain oven’s capacity as described in the following picture:

With Rules Solvera user can define the problem in the following Excel rules tables:

To solve the problem a user specifies the following main method (also in Excel):

Here are the results:

A[0 — 1 –> 1)    requires Oven[2]
B[3 — 4 –> 7)    requires Oven[1]
C[5 — 4 –> 9)    requires Oven[1]
D[5 — 2 –> 7)    requires Oven[1]
E[11 — 4 –> 15) requires Oven[2]

You may read the proper user manual with a lot of examples at and download and try the software from

Hopefully, other BRMS vendors will follow OpenRules lead and will integrate JSR-331 in their Business Rules products.


About jacobfeldman

CTO at
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s