The Rule Execution Server Console provides a Web testing interface to enter ruleset parameter values and invoke a deployed ruleset.
To test the invocation of a ruleset:
-
In the Navigator panel, click the relevant ruleset.
-
In the Ruleset View, click
Test Ruleset.
The
Test Ruleset View opens. This views shows a table listing the input parameters for the ruleset. If there are dependencies between your ruleset parameters, you can reorder them accordingly. Select a parameter using the check box, then click
Up to move the parameter up the table, or click
Down to move it down the table.
If your ruleset parameters are XML-based, no value is set for them. If they are Java-based, a default value is set.
-
To edit the values for each of the input parameters, you can use plain text or upload a file:
To enter text, click
Edit mode on the right of the field and type a value for the parameter.
The following is an example for an XML parameter named
customer:
<?xml version="1.0" encoding="UTF-8"?>
<customer xmlns:ns="http://www.ilog.com/rules/customer">
<owner>George Smith@ILOG</owner>
<initialValue>2000.0</initialValue>
<currentValue>800.0</currentValue>
<sectorPosition>800.0</sectorPosition>
<bankStockPosition>800.0</bankStockPosition>
<oilStockPosition>800.0</oilStockPosition>
<railStockPosition>800.0</railStockPosition>
<bondPosition>800.0</bondPosition>
<futurnPosition>800.0</futurnPosition>
<stockPosition>800.0</stockPosition>
<currency>Euro</currency>
To enter data from an XML or Java file, click
Upload file, and then click
Browse to select a file using the
Choose File dialog.
-
Click
Visualization mode to save the value.
-
Enter the Execution URL.
This value is mandatory and should point to the Servlet provided in the archive
<InstallDir>/executionserver/applicationservers/<appservername>/jrules-ssp-<appservername>.ear.
The Web application defines a rule execution Servlet that responds to a URL. When a client sends an execution request to this URL, the Servlet responds by initializing the input parameters, invoking the ruleset using a stateless rule session, and returning the output parameters.
-
If you want to execute the ruleset using a known rule task, select the check box next to Execute Task, and enter the name of the task in the text box.
-
Click Execute.
The Test Ruleset View page then displays the results of the invocation. Two boxes are displayed:
| Note |
| The Web testing interface is not a programmatic interface and is not designed for automated execution.
|
See Also
Generating Ruleset Statistics