Business Rules Simulator
The Business Rules simulator reads in an input file and sends initialize and decision messages to the Business Rules Server. If trace logging is enabled, the Business Rules API (pdapi) outputs tracing information to a file. The simulator allows expected results data to be specified in the input file and compared against the data returned from the server. It also allows the user to specify output fields that are written to the trace file.
The simulator has several command line options that can be provided. Table 1 describes the arguments and their functions:
| Option | Example | Description |
|---|---|---|
| -help | none | Prints the help text for running the simulator |
| -pf= | C:/temp/filename.txt | Name of the input file to drive the simulator. This option is required. |
| -tf= | C:/temp/filename.trc | Name of the output file. The results and trace data are written to this file. |
| -wf= | MyWorkflow | Name of the workflow to run on the Business Rules Server. The workflow name can be specified on the command line or can be in the input file. The workflow name can also be configured in the API configuration file. |
| -ip= | 127.0.0.1 | The IP address of on the Business Rules Server. If not specified, 127.0.0.1 (localhost) is assumed. The IP address can also be configured in the API configuration file. |
| -pt= | 2005 | The port number of on the Business Rules Server. If not specified, 2005 is assumed. The port number can also be configured in the API configuration file. |
| -t1 | 20000 | Maximum time the Business Rules Server allows a decision to execute. If not specified, 20000 is used. |
| -t2 | 999999 | Maximum time the Business Rules Server remains inactive between decision requests. If not specified, 999999 (disabled) is used. |
| -trace= | 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. |
| -count= | 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. |
| -verbose | None | Short form -ver: Turns on verbose output. The command line arguments and each line of incoming data from the input file are printed in the output file. |
| -diffonly | None | Short form: -dif: Shows the initialize and terminate messages. Also shows decision messages that have a failure on the compare. |
| -quiet | None | Short form: -qu: Turns on quiet output. Only timing information and the beginning of file and end of file banners are printed to the output file. |