Creating a web service or monitored transparent decision service project

You can create projects either for web services or for monitored transparent decision services for RuleApps by using the web service generator. With the generated files, you can execute a ruleset and create a class of monitored transparent decision services for JDK 7.

Before you begin

Deprecated feature:

Deprecation icon Managed Transparent Decision Services (MTDS) is deprecated in V8.8.1. This feature will be removed in a future release of the product. See Deprecated features for migration details.

To create a client project for RuleApps, you must first create RuleApp projects (see RuleApps and RuleApp projects).

Procedure

  1. Click File > New  >  Project.
  2. In the New Project wizard, select Client Project for RuleApps, and 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, and then click Next.
  6. On the Ruleset Archive page, select the ruleset archive that you want to execute from the project, and then click Next.
  7. On the Main Task Name page, proceed in one of the following ways:
    • Select the check box to specify an alternative rule flow task to start the execution of a ruleset. You can specify an alternative rule flow task only if the ruleset archive contains a rule flow. If a ruleset has no rule flow, no alternative tasks are listed.
    • Select the name of the alternative task.
    • Click Next.
  8. On the Web Service Properties page, proceed as follows:
    1. Use the defaults for Interface Name, Implementation Name, Client Name, and Client project name suffix, or replace them.

      The Client project name suffix field indicates the suffix that is automatically added to the project name to create the client project name. The resulting client project contains the source code that is necessary to execute the web service.

    2. Specify whether you want to generate the classes as a transparent decision service.
    3. Click Browse.
    4. On the Execution Server Configuration Selection page, proceed as follows:
      1. Select the configuration.
      2. Click OK to return to the Web Service Properties page.
      3. Click Next to move to the Execution Options page.
  9. If no configuration is available for selection, create one by using the 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.
      If no project is available for selection, create one as follows:
      1. Click Create a new configuration project.
      2. On the New Rule Execution Server Configuration Project page, enter the name of the new configuration project.
      3. Click Finish.
      4. On the Add New Configuration to a Project page, select the configuration project that you have just created and click Next.
    3. On the Configure Rule Execution Server page, select the server and click Next to specify the server configuration.

      The Server Configuration page displays the configuration name.

    4. Complete the following details:
      1. Click Browse and select the appropriate Installation and Deployment directories.
      2. If you want to deploy the RuleApp on the Rule Execution Server console, enter the Rule Execution Server console details.
      3. If you want to test that you have a connection to a Rule Execution Server console, click Test Connection.

        The test succeeds if the Rule Execution Server console is installed on the server that you selected.

      4. If necessary, type the URL of a client application that will use the RuleApp or the web service.
    5. Click Next.
    6. On the RuleApp Deployment page, select the deployment mode: Rule Execution Server console, file, or database.
      • If you select to a file system, use the default destination directory or browse and select a different one.
      • If you select to a database, add the following details for the project:
        • Driver: Select a driver from the drop-down menu.
        • Driver path: Click Browse and locate the driver.
        • URL: Enter the URL of the database.
        • Login: Enter the log-in information to access the database.
        • Password: Enter the password.
    7. Click Finish, and select the new Rule Execution Server configuration.
  10. On the Web Service Properties page, make sure that the Rule Execution Server configuration is selected and click Next.
  11. On the Execution Options page, select Generate a trace and select the execution data to generate a tracefilter.properties file in the config directory. This file is used to build an execution trace.
  12. Click Finish.

Results

The new web service project and the web service client project are displayed in the Rule Explorer view. They include the following files:
Generated web service project
  • .java and .xml files that implement a web service
  • An Ant build file named build.xml
  • A build.properties file
  • A logging.properties file that configures the handlers
  • The RuleApp archive file
  • For Tomcat, the execution unit (XU) configuration file named ra.xml. The ra.xml file is not created for WebSphere® Application Server and JBoss.
Generated web service client project
  • .java and .xml files that implement the web service client
  • An Ant build file named build.xml
  • A build.properties file
    Important:

    Make sure that the host name and port number in the WSDL URL are correct.