Overview: Ruleset execution
After you have defined and developed your business rules, you integrate the rule engine with your application in a Rule Designer test scenario or by using the rule engine API.
You can integrate the rule engine into your application in the following ways:
By writing a test scenario in Rule Designer: you can use the Java™ Project for Rules and the templates provided to instantiate a rule engine.
By using the rule engine API: in Java SE, you use simple API calls to assert, evaluate conditions, and execute actions defined in a rule. Integration with the rule engine is light and has little lock-in with the core application because you do not have to extend any classes or override any existing methods.
The rule engine is embedded in your Java SE application using the APIs provided and the rules are managed in a ruleset, which must be retrieved and passed to the rule engine. Use this scenario if you require fine control of the rule engine through its API and you develop your business rule application on Java SE.
The workflow is as follows:
A Java Project for Rules is a predefined Java project for Eclipse that contains a single runnable main class to execute rules contained in a rule project. To execute a Java project for rules, use the run-and-debug configuration Java Application with Rules.