RuleApp execution code generators
To call a ruleset on Rule Execution Server, you must write execution code to locate a deployed RuleApp that contains the ruleset on an application server. Decision Server includes a set of generators for you to create execution code, together with the necessary configuration parameters and resources for a new client project. You can use the code generators to create ruleset execution code for your Eclipse client projects.
- In Rule Explorer, right-click your rule project and select .
- In the New Project window, select one of the following wizards:
- Client Project for RuleApps
| Wizard | Use with | Description | Generator |
|---|---|---|---|
| Client Project for Decision Service |
You associate the client project with a deployment configuration. |
Generates the necessary Java code to invoke a particular RuleApp based on a
deployment configuration. The deployment configuration defines the operations or rulesets to use and identifies the target servers to connect to. The client project is generated in only one Rule Execution Server on Java SE target (one folder on the file system). XOM deployment is not supported for Java SE targets, though it can be configured by using the class path. |
Java Project for Rule Execution Server on Java SE: Generates a simple Java project with a main method that demonstrates a ruleset invocation. |
| JUnit Project for Rule Execution Server on Java SE: Generates, for each ruleset, a JUnit test case with one test that can be duplicated to test with another set of parameters. | |||
| Client Project for RuleApps |
You associate the client project with a RuleApp project. |
Generates the necessary Java code to invoke a particular RuleApp based on a RuleApp project. | Plain Old Java Object (POJO): Generates a POJO class, together with
other utility classes. A build.xml file is also generated to help you to compile and run your generated POJO. RuleApp archives are deployed automatically. If the ruleset archive is modified, export the RuleApp archive in the generated project to replace the existing one, and run the Ant target again. The build.xml file contains targets to deploy and undeploy RuleApp archives, build and run the project, and regenerate the deployment descriptor ra.xml file. A Java™ Application with Rules .launch configuration file is also generated. The project name is used to prefix the name of the configuration file. |
Because Operational Decision Manager is divided into modules (executionserver, studio, teamserver), each module contains its own lib directory.
You need to define executionserver.home before importing
classpath-executionserver.xml, and engine.lib.dir for
classpath-engine.xml. The executionserver.home value is
<InstallDir>/executionserver and the
engine.lib.dir value is
<InstallDir>/executionserver/lib. It is not necessary
to define this property when importing classpath-executionserver.xml.
The sample File ruleset execution shows how to run a ruleset that is deployed on the file system. It provides an example of an Ant build file that uses the classpath-executionserver.xml file to package an application executing rules in <InstallDir>/executionserver/samples/j2serulesession/build.xml.
- For these generators to run, you must have Rule Execution Server correctly installed. If it is not installed, or if the Eclipse variable ILOG_EXECUTION_SERVER_HOME is not set correctly, an error occurs and you are unable to select a project generator.
- Rulesets can include references to both Java objects and XML objects.