Batch Processor output

Go to:

Value formats for csv output

Value formats for database output

Coverage output

Test case output

Sessions output

Include inferred entities in Batch Processor output

Value formats for csv output

When the Batch Processor writes out csv output it writes them in the following manner:

 

Value Type Output Format Uncertain or Unknown
Number and Currency

Numeric values written as decimal numbers with a period as the decimal separator.

The number is formatted up to 15 significant decimal places; for example:
3.123456789876543

Both written as blank
String String values are written as is. Both written as blank
Boolean Boolean are always written as "true" or "false" Both written as blank
Date

Date values are always written in the format "yyyy-MM-dd" where:

  • yyyy is the four-digit year.
  • MM is the two-digit month, including leading zero for values below 10.
  • dd is the two-digit day, including leading zero for values below 10.
Both written as blank
DateTime

Date time are always written in the format "yyyy-MM-dd HH:mm:ss" where:

  • yyyy is the four-digit year.
  • MM is the two-digit month.
  • dd is the two-digit day.
  • HH is the two-digit 24-hour hour value.
  • mm is the two-digit minute value.
  • ss is the two-digit seconds value.
Both written as blank
Time

Time are always written in the format "HH:mm:ss" where:

  • HH is the two-digit 24-hour hour value.
  • mm is the two-digit minute value.
  • ss is the two-digit seconds value.
Both written as blank

Value formats for database output

Batch Processor results are written to the database using JDBC. It is recommended that where possible, the output column in the database matches the Oracle Policy Automation attribute (date and datetime, numbers and so on).

When writing date or datetime attributes to the database, the resulting value will depend on the data type of the table column to which it is being written:

 

For boolean values, a global boolean format is provided to control the value written to the database; see the topic Specify the global boolean format.

Null values are always treated as uncertain; except for string types which will produce output ofempty string.

Coverage output

When the output of the batch processor is set to coverage (--coverage <coverage file>) the result is a single file which can be imported into Oracle Policy Modeling as follows:

  1. Select Analyze coverage file from the Reports menu.
  2. Select the coverage file generated by the batch processor and click on the Open button; the coverage file will be imported into Oracle Policy Modeling.

For more information see the Oracle Policy Modeling User's Guide.

Test case output

When the output of the Batch Processor is set to test cases (--exporttsc <filename>), the result is a single file which can be imported into Oracle Policy Modeling as follows:

  1. In the Project explorer, right-click and choose "Import existing file".
  2. Select the test case file generated by the Batch Processor and click on the Open button; the test cases file will be imported into Oracle Policy Modeling.

For more information see the Oracle Policy Modeling User's Guide.

Sessions output

When the output of the Batch Processor is set to sessions (--export <export dir>) the result is a set of OPA sessions, generated as XML files. There will be one session file generated for each case.

A session XML file can be used in Oracle Policy Modeling debugger. To load an individual session file into an active debugger session in Oracle Policy Modeling as follows:

  1. Start the debugger.
  2. In the Data tab of the debugger click on the Import button.
  3. Select the session file to import and click on OK; the session data will be imported into the active debugger session.

Include inferred entities in Batch Processor output

The Batch Processor supports the ability to include inferred entities as output when reading from and writing to CSV data files. Inferred entities are not supported for other input or output types, such as database input or test script output. Output includes the containment relationships of the inferred entities only; it does not include any other inferred relationship details.

Data File

To include instances of an inferred entity in the output, the CSV input directory must include a data file that the Batch Processor can match to the inferred entity. The data file mapping rules are the same as those for non-inferred entities:

 

If no explicitly or implicitly matching data file can be found in the CSV input directory, instances of the inferred entity are not included in the output. Additionally, the Batch Processor will apply the following rules:

Examples

The following are simple examples of how instances of the inferred Benefit entity can be included in the output, using explicit configuration and implicit configuration. The examples are based on the Inferred Benefits example rulebase provided with Oracle Policy Automation and located at: examples\rulebases\InferredBenefits.zip.

Explicit Configuration

The CSV input directory contains a CSV file named benefit-mapped.csv. This file contains a row of column headings only and contains no data. The column headings are not marked as output, and do not match the public names of the inferred entity attributes:

 

 

The XML configuration file contains a <mapping> element for the benefit entity:

...
  <mapping entity="benefit" table="benefit-mapped" primary-key="#" >
    <attribute name="benefit_name" field="b-name" output="true" />
    <attribute name="benefit_total_eligible" field="b-total" output="true" />
    <relationship name="all-benefits" source-entity="global" foreign-key="g-key" />
  </mapping>
...   

 

The explicit mapping instructs the Batch Processor to map the inferred benefit entity to the benefit-mapped.csv file with the identified output columns for the entity attributes.

Implicit Configuration

The CSV input directory contains a CSV file named benefit.csv, matching the public name of the benefit entity from the rulebase; no explicit mapping is provided. The file contains a row of column headings only and no data. The column headings are marked as output and match the public names of the inferred entity attributes:

 

 

In the absence of an explicit mapping provided by a configuration file, the Batch Processor will match the benefit.csv _file name to the public name of the _benefit entity. The identified output columns will be mapped to the entity attributes with matching public names.