ILOG JRules User Guide > Testing Rules with Rule Scenario Manager > Reference > Test Extractors and Operators > OUTPUT_PARAMETERS

Extracts the output parameters produced during the execution of the ruleset.

The extracted value is a table of strings, and can be compared using the following operators:

OUTPUT_PARAMETERS operators 
Operator 
Compares 
CONTAINS 
The extracted list contains at least one occurrence of each parameter in the test list. Note that the databinding class used for this comparison is defined between brackets ([ and ]) within the test definition, giving its complete path. 
NOT_CONTAINS 
The extracted list does not contain the parameters in the test list. 
EQUALS 
The extracted list is equal in contents to the test list. 
NOT_EQUALS 
The extracted list is not equal in contents to the test list. 

All operators can also take as a test value the name and path of an XML file containing code to be searched for in the output parameters. This file is given after the databinding class required to read the file. For example:

<test extractor="OUTPUT_PARAMETERS" operator="CONTAINS"> [ilog.rules.ras.binding.xml.impl.IlrXMLInOutParametersImpl]./data/scenario/template/inputs/LoanValidationInputReference.xml
</test>

The operators CONTAINS and NOT_CONTAINS can also take as test values blocks of XML code. The test searches all nodes of the pattern, ignoring other structures in the extracted results.

For example, to search for the following pattern:

<ilog.rsm.searchpattern type="ilog.rsm.searchpattern">
      <amount type="double">250.0</amount>
      <handler type="string">Agent</handler>
      <handlerID type="string">Ag123</handlerID>
</ilog.rsm.searchpattern>

within output parameters in the following style:

<entry>
  <string>outputs</string>
  <vector>
...
[many ilog.rsm.searchpattern patterns]
...
  </vector>
</entry>

you would define your test as follows:

<?xml version="1.0" encoding="UTF-8"?>
<tests>
   <test extractor="OUTPUT_PARAMETERS" operator="CONTAINS">
      <entry>
         <string>outputs</string>
         <vector>
            <ilog.rsm.searchpattern type="ilog.rsm.searchpattern">
               <amount type="double">250.0</amount>
               <handler type="string">Agent</handler>
               <handlerID type="string">Ag123</handlerID>
            </ilog.rsm.searchpattern>
         </vector>
      </entry>
   </test>
</tests>

Related Sections

INPUT_PARAMETERS
Type Precisions Used in Input and Output Parameter Tests