To create a Java™ project
for ruleset execution, you use the Java Project
for Rules page of Rule Designer.
About this task
To run a ruleset by using an instance of a rule engine,
you must first create a Java project
for your rules.
Procedure
To create a Java project
for rules:
- On the File menu, click.
- In the New Project wizard, select Java
Project for Rules.
- Click Next.
- In the Java Project for Rules page,
specify the name and location of your rule project:
Type
a name for your project in the Project name field.
If
you want the project to be saved in your Eclipse workspace, keep the Use
default box selected.
If you want to save your project
in a different location, clear the Use default box
and browse to select a directory in the Location field.
- Click Next.
- In the Java Project for Rules Settings page,
specify the rule project that provides the ruleset for the Java project for rules, then click Next.
- In the Java Project for Rules Templates page,
specify a template to generate the main class of the Java project.
The following templates
are available:
Simple Rule Engine Runner: Generates
a simple class to run a ruleset.
Rule Engine Runner: Generates a class
to run a ruleset with parameters and provides debug handling.
Rule Engine Runner Test Case: Generates
a class to run a ruleset with parameters. The generated class
is packaged as a JUnit test.
- Click Finish.
- When prompted to switch to the Java Perspective, click Yes.
Results
A ruleset archive was created at the root of the Java project for rules. The default archive
name is ruleArchive1.jar.