Installing, configuring, and running the Business Rules simulator
The simulator is a Java™™ program that is included in the artifact container in Red Hat® OpenShift® installations, under userexit.zip that is at share/artifacts.
A script file to help set up the environment for the simulator is provided. The file adds the JAR and
shared library files to the system class path and the PATH environment variable. This example shows how to use
the script file to run the simulator with the same file name and arguments as the previous example:
- Create a tmp folder.
- Copy the userexit.zip from the Check container to your local computer.
- Decompress the userexit.zip file.
unzip tmp/userexit.zip - Create the BRSimulator folder.
- Copy the Business Rules simulator’s libraries and configurations from the user exit to the
BRSimulator
folder.
cp -R tmp/userexit/sdk/sdk_common/SDK/BusinessRules/client/java/* BRSimulator/ - Confirm that the lib, cmd, and the properties folders are copied to the BRSimulator folder.
- Copy the certificate stores from the Business Rules Server pod to the BRSimulator folder.
- Confirm that the key.p12 and truststore.jks files are copied to the BRSimulator/cert folder.
- Create the route to connect Red Hat OpenShift Business Rules Server. For more information, see Provide external access to FTM services in Red Hat OpenShift
- The simulator has several properties that can be provided. Table 1 describes the arguments and their functions. You can edit the properties in the configuration file (/properties/izwsimulator.properties).
- Switch to the BRSimulator/cmd folder, run the izwsimulator.sh for the Linux® platform and the izwsimulator.bat file for the Windows platform.
The following table provides the options that are present in the
/properties/izwsimulator.properties configuration file and their purpose. All the
properties are required. You can keep the default value if there is no change in the value.
| Property | Example or Default value | Description |
|---|---|---|
| inputFile | ./inputFile.txt | Name of the input file to drive the simulator. |
| primaryIPHost | Route name of Red Hat OpenShift Business Rules Server | Create the Red Hat OpenShift route for Business Rules Server, which can be used as host to connect Red Hat OpenShift Business Rules Server from Business Rules simulator. |
| primaryIPPort | 443 | Port number for the Business Rules Server. The default value is 443. |
| decisionResponseTimer | 20000 | Maximum time the Business Rules Server allow a decision to run. |
| decisionRequestTimer | 999999 | Maximum time to Business Rules Server to remain inactive between decision requests, default value is 999999. |
| decisionRequestCount | 5 | Causes the simulator to send exactly the number of decision requests as specified. If the file contains more decision data than the count variable, it stops sending decision requests when count is reached, default value is 5. |
| workFlowName | myWorkflow | Name of the workflow to run on the Business Rules Server. |
| traceFile | traceFile.trc | Name of the output file. The results and trace data are written to this file. |
| enableTrace | Y/N | Returns server tracing information to the simulator if enabled. If trace is enabled, entry and exit of workflows, nodes, and tasks are traced along with table lookup keys and payloads. This information is included in the trace file. |
| quiet | Y/N | Turns on quiet output. Only timing information and the beginning of file and end of file banners are printed to the output file. |
| showDiff | Y/N | Shows the initialize and terminate messages. Also shows decision messages that have a failure on the compare. |
| verbose | Y/N | Turns on verbose output. The command-line arguments and each line of incoming data from the input file are printed in the output file. |
| isSSLEnabled | TRUE/FALSE | Flag to enable or disable SSL/TLS communication between Business Rules simulator and Business Rules Server server, for Red Hat OpenShift Business Rules Server. It must always be true for Red Hat OpenShift FTM installation. |
| keyStore | ../cert/key.12 | Keystore file path used by the Business Rules simulator for SSL/TLS communication. |
| keyStorePassword | password | Password to decrypt the key store file. |
| keyStoreFormat | PKCS12 | Store type used keystore file. The default value is PKCS12. |
| Truststore | ../cert/truststore.jks | Truststore file path used by Business Rules simulator for the SSL or TLS communication. |
| trustStorePassword | password | Password to decrypt the truststore file. |
| trustStoreFormat | JKS | Store type used for truststore file. The default value is JKS. |