RuleApp execution code generators

You can use code generators to create ruleset execution code for your Eclipse client projects.

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.

A Client Project for RuleApps is an Eclipse project to execute a RuleApp on Rule Execution 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. The following generators are available:

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.

This generator is available for both wizards: Client Project for RuleApps and Artifacts for RuleApps.

Web service

Generates either a web service class for JDK 6 or a monitored transparent decision service project with the required files and method calls, depending on your selection. A build.xml file is generated to help you deploy your generated web service or decision service and regenerate the deployment descriptor ra.xml file.

To run the generated projects, you need the following software:
  • JDK 6
  • Tomcat 7.0, JBoss 5 or 6.1, or WebSphere® Application Server 7.0, 8.0, or 8.5
  • JAX-WS 2.1: the required JAR files are provided in the <InstallDir>/executionserver/lib/jaxws directory.

This generator is available in the Client Project for RuleApps wizard. It creates a web service project or a transparent decision service project, and a client project.

The RuleApp project is also the base of the SCA archive. The SCA archive is the starting point for the implementation of a Decision Server business function as a service.

Service Component Architecture (SCA) components

Generates an SCA archive that you can import into Rational® Application Developer to develop and edit an SCA service.

The SCA archive provides server-side files. It contains the description files, configured implementation Java classes, and the .jar files for the Java XOM and the Rule Execution Server rule session.

This generator is available in the Export SCA Archive wizard.

You can also extend the provided generators to generate these project components. For more information, see Customizing execution code generators.

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.

You can find an example of an Ant build file that uses executionserver.j2se.classpath in <InstallDir>/executionserver/samples/j2serulesession/build.xml. That sample shows how to make your packaging and how to use the classpath-executionserver.xml file.

Note: