Creating a Web Service or Monitored Transparent Decision Service Project for RuleApps
|
PREVIOUS
NEXT
|
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:
-
On the File menu, click New > Project.
-
In the New Project wizard, select Client Project for RuleApps, then click Next.
-
Expand the Rule Execution Server category, select the Web Service generator, then click Next.
-
On the Client Project Name page, enter the name of the project, then click Next.
-
On the RuleApp Project page, select the RuleApp project for which you want to generate the project, then click Next.
-
On the Ruleset Archive page, select the ruleset archive(s) that you want to execute from the project, then click Next.
-
On the Main Task Name page, either:
-
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.
You can specify an alternative ruleflow task only if the ruleset archive contains a ruleflow. If a ruleset has no ruleflow, no alternative tasks are listed.
-
Leave the check box empty and just click Next to display the Properties page.
-
On the Properties page:
-
Either accept the defaults for Interface Name, Implementation Name, Client Name and Client project name suffix, or replace them.
Client project name suffix is the suffix automatically added to the project name to create the client project name. The client project will contain the source code needed to execute the Web service.
-
Specify whether or not you want to generate the classes as a transparent decision service:
- If you do, leave the
Generate as a transparent decision service check box selected and specify the name of the
Author for the monitored transparent decision service.
- If you do not, deselect the check box.
The
Author field is greyed out of you deselect the
Generate as a transparent decision service check box.
-
Click Browse.
-
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.
-
If there is no configuration to select, create one using the New Rule Execution Server Configuration wizard, as follows.
-
On the Execution Server Configuration Selection page, click Create a configuration.
-
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.
If there is no project to select, create one as follows:
- Click
Create a new configuration project.
- On the
New Rule Execution Server Configuration Project page, enter the name of the new configuration project.
- On the
Add New Configuration to a Project page, select the configuration project you have just created and click
Next.
-
On the Configure Rule Execution Server page, select the required server and click Next to specify the server configuration.
-
The Server Configuration page displays the configuration name. Complete the following details:
- Click
Browse and select the required Installation and Deployment directories.
- If you want to deploy the RuleApp on the Rule Execution Server Console, enter the Rule Execution Server Console details.
- Click
Test Connection if you want to test that you have a connection to a Rule Execution Server Console. It will succeed if the Rule Execution Server Console is installed on the server you selected.
- If required, type the URL of a client application that will use the RuleApp or the Web service that the Web Service generator will generate.
-
Click Next.
-
On the RuleApp Deployment page, select the required deployment mode (Rule Execution Server Console, file or database).
If you select
to a file system, you can either accept the default destination directory, or browse and select a different one.
If you select
to a database, you need to add the following details for the project:
- Driver: Select a driver from the drop-down menu.
- Driver Path: Click
Browse and locate the driver path.
- URL: Enter the URL of the database.
- Login: Enter the login required to access the database.
- Password: Enter the password for this login.
-
Click Finish, and select the new Rule Execution Server configuration.
-
On the Properties page, with the Rule Execution Server configuration selected, click Next to move to the Execution Options page.
-
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.
-
If you do not want to generate an execution trace, accept the default No trace.
-
If you want to generate a trace, click Generate a trace and select the execution options you require.
-
Click Finish.
-
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/monitored transparent decision service project (depending on your selection on the Properties page): this project provides all the .
java and .xml files to integrate in the deployed WAR, and the build.xml to generate and deploy the WAR. For a monitored transparent decision service project, the WAR contains the file that defines the monitored transparent decision service.
-
The Web service client project: this project executes the deployed Web service/monitored transparent decision service and provides a readme file with more information.
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:
-
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.
-
Start the Tomcat Web service server.
-
Deploy the Application: Use the delivered Ant file to deploy your Application:
ant deploy.ruleapp.
-
Open the WSDL file in a browser (the address is indicated in the
readme.html of both projects).
-
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:
-
JDK 5.0
-
Tomcat 6.0 or JBoss 4.0.x
Related Concepts
Related Tasks
Related Reference
Related Samples and Tutorials