ILOG JRules User Guide > Executing Rules > Tasks > Executing a Ruleset Using Rule Execution Server > Creating a Web Service or Monitored Transparent Decision Service Project for RuleApps

You can create either a Web service or a monitored transparent decision service project for RuleApps, using the Web Service generator. The Web Service generator generates files that enable you to execute a ruleset, and creates a monitored transparent decision service class for JDK 5.0.

The sample screens in this section show details for a monitored transparent decision service project.

To create either a Web service or a monitored transparent decision service project for RuleApps:

  1. On the File menu, click New > Project.
  2. In the New Project wizard, select Client Project for RuleApps, then click Next.
  3. Expand the Rule Execution Server category, select the Web Service generator, then click Next.
  4. On the Client Project Name page, enter the name of the project, then click Next.
  5. On the RuleApp Project page, select the RuleApp project for which you want to generate the project, then click Next.
  6. On the Ruleset Archive page, select the ruleset archive(s) that you want to execute from the project, then click Next.
  7. On the Main Task Name page, either:
    1. Select the check box to specify an alternative ruleflow task to start the execution of a ruleset, select the name of the alternative task then click Next.
    2. Leave the check box empty and just click Next to display the Properties page.
  8. On the Properties page:
    1. Either accept the defaults for Interface Name, Implementation Name, Client Name and Client project name suffix, or replace them.
    2. Specify whether or not you want to generate the classes as a transparent decision service:
    3. Click Browse.
    4. On the Execution Server Configuration Selection page, select the required configuration, click OK to return to the Properties page, then click Next to move to the Execution Options page.
  9. If there is no configuration to select, create one using the New Rule Execution Server Configuration wizard, as follows.
    1. On the Execution Server Configuration Selection page, click Create a configuration.
    2. On the Add New Configuration to a Project page, select the Rule Execution Server project for which you want to add the new configuration and click Next to specify the Rule Execution Server Configuration Project name.
    3. On the Configure Rule Execution Server page, select the required server and click Next to specify the server configuration.
    4. The Server Configuration page displays the configuration name. Complete the following details:
    5. Click Next.
    6. On the RuleApp Deployment page, select the required deployment mode (Rule Execution Server Console, file or database).
    7. Click Finish, and select the new Rule Execution Server configuration.
  10. On the Properties page, with the Rule Execution Server configuration selected, click Next to move to the Execution Options page.
  11. On the Execution Options page, select whether or not you want to generate a tracefilter.properties file in the config directory. This file will be used to build an execution trace.
  12. images/client_execution_options.png
    1. If you do not want to generate an execution trace, accept the default No trace.
    2. If you want to generate a trace, click Generate a trace and select the execution options you require.
  13. Click Finish.
  14. Project creation starts and you are asked if you want to view the Readme file for each project. We recommend that you say Yes to both prompts.

This wizard creates two projects:

The Web service client project is generated with errors because a number of classes are missing. These classes must be generated with JAX-WS when the Web service is installed. The WSDL is used to generate the missing files.

To generate these classes using the build.xml file in the new project:

  1. Install the Web service from the Web service project. Prepare the Web service--compile and make your classes and resources available to JAXWS 2.0 RI: ant deploy.war.
  2. Start the Tomcat Web service server.
  3. Deploy the Application: Use the delivered Ant file to deploy your Application: ant deploy.ruleapp.
  4. Open the WSDL file in a browser (the address is indicated in the readme.html of both projects).
  5. Generate the .java files from the .wsdl file. Use the generated Ant file to generate the files: ant generate-client.

For more information, refer to the readme.html in the client Web service project.

Running the Generated Web Service/Monitored Transparent Decision Service Projects

To run a Client Project for RuleApps you need to have installed Rule Execution Server. An Eclipse launch configuration and an ANT build file are provided to run the project.

The generated build.xml uses the classpaths defined in <InstallDir>/executionserver/lib/classpath-executionserver.xml to call the correct libraries.

To run the generated transparent decision service project, you also need to install:

Related Concepts

Overview: Execution Code Generators
RuleApps and RuleApp Projects
RuleApp Execution Code Generators
Ruleset Parameters
Ruleset Execution Trace

Related Tasks

Creating a POJO Client Project for RuleApps
Creating an SCA Component Client Project for RuleApps
Creating an SSP Setup Client Project for RuleApps
Adding RuleApp Execution Artifacts to an Existing Project
Maintaining Execution Code Generators
Invoking a Ruleset Using a Stateless Rule Session
Invoking a Ruleset Using a Stateful Rule Session
Invoking a Ruleset Using a Message-Driven Rule Bean
Tracing Ruleset Execution

Related Reference

New Client Project for RuleApps Wizard
New Rule Execution Server Configuration Wizard
New Rule Execution Server Configuration Project Wizard

Related Samples and Tutorials

How to Use a Rule Session in Java SE
How to Use a Rule Session in Java EE
How to Use a Message-Driven Rule Bean