OpenRules Platform

Relational Database Integration

Rule DB – SQL Inside Rules

This combined project keeps SQL selection inside the decision repository and demonstrates a larger, modular Rule DB model.

Combined model

Bring order totals and unpaid alerts together.

The standard installation includes Evaluate Orders and Unpaid Orders. The SQL Inside Rules project combines both models and adds more advanced capabilities.

Files in the SQL Inside Rules repository
Modular Rule DB repositoryOpen full size ↗

Repository structure

Organize selection, glossary, rules, and environment.

DataSQL.xlsx contains the SelectedOrders and UnpaidOrders DataSQL tables. Glossary.xlsx contains their corresponding glossaries.

Rules.xls contains the business rules and the main DefineCustomerFinancials table, which calls DefineTotals, DefineAlerts, and ShowResults. DecisionModel.xlsx contains the Environment table and references the other files.

DefineCustomerFinancials main table
Combined model orchestrationOpen full size ↗
SQL Inside Rules Environment table
References to model files and database settingsOpen full size ↗
SQL Inside Rules decision diagram
Combined decision model in OpenRules ExplorerOpen full size ↗

Execute and deploy

Run locally, call from Java, or expose REST.

Run test.bat to produce combined results. A standard Java API example is included in src/test/java/Test.java; enable it with run.class=sample.Test in project.properties.

The model can also run as a REST service. Execute runLocalServer, then use POSTMAN with http://localhost:8080/customer-sample and an empty JSON request {}.

SQL Inside Rules execution results
Combined decision resultsOpen full size ↗
Java API code for the SQL Inside Rules model
Invoking the model from JavaOpen full size ↗

Try Rule DB

Build a decision model that works directly with your data.

The free evaluation includes Rule DB and ready-to-run database examples.