ILOG JRules User Guide > Executing Rules > Tasks > Executing a Ruleset Using Rule Execution Server > Creating an SCA Component Client Project for RuleApps

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:

  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 SCA Component 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 Ruleset Parameters page, either accept the default parameter values, or change them.
  8. images/client_parameters.png
    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:
    1. Select the relevant row in the table, then click Change.
    2. In the Edit Ruleset Parameter dialog, specify a parameter value.
    3. Enter a value, then click OK.
  9. To accept the default values, or when you have finished changing parameter values, click Next.
  10. 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.
  11. On the Properties page:
    1. Either accept the default names for Interface Name and Implementation Name and Client Name or replace them.
    2. Click Browse.
    3. 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.
  12. 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 Configuration Name page, either accept the default configuration name or replace it with your own, then click Next.
    4. On the RuleApp Deployment page, select the required deployment mode (file or database).
    5. Click Finish, and select the new Rule Execution Server configuration.
  13. On the Properties page, with the Rule Execution Server configuration selected, click Next to move to the Execution Options page.
  14. 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.
  15. 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.
  16. Click Finish.
  17. 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

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 a Web Service or Monitored Transparent Decision Service 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