Back Forward How to use a stand-alone command-line BIX extract process

 

For general information on how BIX (Business Intelligence Exchange) works, see Extracting data with BIX.

In certain circumstances, you may want to establish BIX as a stand-alone command-line process, rather than importing it into a PRPC system. For instance, you may want to avoid disrupting a production instance of PRPC, or you may want to use the same instance of BIX to extract data from multiple PRPC instances.
To establish a stand-alone command-line BIX extract process:

  1. Download the BIX distribution archive to your system and expand the archive into a directory.
       The config directory in this distribution contains the configuration files you set up to support the extraction process, and the lib directory contains the PRPC library files you run against. The distribution also contains a sample Ant build file to run extract process.
  2. Configure a JVM environment with access to PRPC JAR files and the appropriate database driver files. You must have a JRE distribution in place in the command-line system that allows you to make Java calls. Use JVM version 1.6, 1.5 or 1.4.

    Make sure your classpath:
    1. Contains the JAR files in the lib directory of your BIX distribution on the command-line system. This directory contains the PRPC libraries.
    2. Includes the location of the JDBC driver JAR files for your database. For more information on the appropriate driver for your database, see “Configuring database support on your application server” in the Installation Guide. Pegasystems provides a Platform Support Guide with additional information.
  3. Configure prconfig.xml, prbootstrap.properties, and prlogging.xml (as described above) to complete the command-line environment.

A sample shell script file

The following is a sample ksh script calling the ExtractImpl class with an XML representation of the Extract rule. This sample assumes the script is being run from the BIX distribution directory and that the CLASSPATH environment variable has been set correctly to include the JAR files in the BIX distribution's lib directory.

ksh script

  1. JVM arguments to set the JVM memory parameters.
  2. JVM arguments to set system properties specifying the location of prconfig.xml and prlogging.xml
  3. ExtractImpl parameters: -I switch with the name of the .xml file containing the XML representation or the Extract rule.

From version 6.1 onwards, the engine classes are stored in the database and not in the file system. The ExtractImpl class cannot be directly run using the Java interpreter. Instead, run the PegaRULES class and pass the ExtractImpl class as an argument, as described earlier.

Sample Ant build files

The following sample Ant build files execute a call to the ExtractImpl class referencing an Extract rule in the PRPC database. The BIX distribution also contains a sample BAT script that calls a similar file.
See the readme.txt file in the BIX distribution directory for details on all the files included there.

sample Ant script

  1. Set the ARGLINE Ant property to the pzInsName of the Extract rule you wish to execute.
  2. Java call of the ExtractImpl class.
  3. JVM arguments to set the JVM memory parameters.
  4. JVM arguments to set system properties specifying the location of prconfig.xml and prlogging.xml.
  5. Set the classpath to include the JAR files in the BIX distribution's directory.
  6. ExtractImpl parameters: -i switch with the pzInsName of the Extract rule as set in the ARGLINE property.

How to create an XML representation of an Extract rule

To create an XML version of an extract rule:

  1. From the Rules Explorer, select SysAdmin > Extract and select the extract rule to run.
  2. On the rule form, Click the Rule Data icon Rule Data. An XML version of the extract rule displays.
  3. Save it as an .xml file.