Creating an SCA Component Client Project for RuleApps
|
PREVIOUS
NEXT
|
An SCA (Service Component Architecture) component code generator helps you to create a client project for J2SE. The Rule Studio wizard generates an SCA component from ILOG JRules artifacts, based on Tuscany M1 for a RuleApp. The SCA component enables you to access a POJO implementation without any detailed knowledge of ILOG JRules.
To create an SCA Component client 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 SCA Component 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 Ruleset Parameters page, either accept the default parameter values, or change them.
The default ruleset parameter values for each ruleset you selected are read from their ruleset archive and displayed on this page. Only IN and IN_OUT ruleset parameters are listed. You do not specify values for OUT parameters, so they are not shown.
To change a ruleset parameter value:
-
Select the relevant row in the table, then click Change.
-
In the Edit Ruleset Parameter dialog, specify a parameter value.
-
Enter a value, then click OK.
-
To accept the default values, or when you have finished changing parameter values, 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 default names for Interface Name and Implementation Name and Client Name or replace them.
-
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 Configuration Name page, either accept the default configuration name or replace it with your own, then click Next.
-
On the RuleApp Deployment page, select the required deployment mode (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. We recommend that you say Yes to this prompt.
Your new SCA Component client project appears in the Rule Explorer view.
Running the SCA Component Client Project
To run a Client Project for RuleApps you need to have installed Rule Execution Server. The generated build.xml uses the classpaths defined in <InstallDir>/executionserver/lib/classpath-executionserver.xml to call the correct libraries.
If Rule Execution Server is not installed, the project is performed with errors: the JAR files in the <InstallDir>/executionserver/lib directory cannot be found, so the compilation fails.
Related Concepts
Related Tasks
Related Reference
Related Samples and Tutorials