| Samples > Rule Execution Server Integration > How to Use a Rule Session in Java SE |
How to Use a Rule Session in Java SE |
PREVIOUS NEXT |
The sample shows you how to execute a rule session in Java SE. It simulates a batch process using a number of pre-trade check operations, with the goal of comparing the results of executing two different versions of a ruleset. The sample also demonstrates the use of Ant task management and the ruleset invalidation feature.
The sample shows you how to execute a rule session in Java SE. It simulates a batch process using a number of pre-trade check operations, with the goal of comparing the results of executing two different versions of a ruleset. The sample also demonstrates the use of Ant task management and the ruleset invalidation feature.
Key features include:
.irl files)
res-write-file
To install the sample through the Samples Console:
executionserver > j2serulesession.
deploy.ruleapp target to register the RuleApp.
The sample can only be run through the Samples Console.
Execute the run command to launch the Java program. This command executes the pre-trade check operations for all orders on the two rulesets.
To run the sample:
01012004rs.jar and 01012005rs.jar, using an Ant task.
orders.xml file that contains 200 pre-trade orders.
01012004rs.jar ruleset archive on the orders file and generate a resultsRules2004.xml file.
01012005rs.jar ruleset archive on the orders file and generate a resultsRules2005.xml file.
The sample is located in <InstallDir>/executionserver/samples/j2serulesession.
J2seRulesession is the class that invokes Rule Execution Server and executes the pre-trade check operations.
OrderUtil is the utility class that generates and manages the pre-trade orders.
Result is the utility class that generates a result file and compares the two result files.
The sample demonstrates a standalone Java SE execution stack use case. The management stack is not deployed, therefore you will not be able to view the deployed RuleApps in the Rule Execution Server Console.
The sample can be rebuilt through the Samples Console.
To rebuild the sample:
executionserver > j2serulesession.
build command to build the classes.
| Copyright © 1987-2008 ILOG S.A. All rights reserved. Legal terms. Documentation homepage. | PREVIOUS NEXT |