You can use Document Generator from a command line without the graphical user interface (GUI). You do this by running a command with parameters for the test documents you want to create. The command is docGen. Run the tool from the application’s bin
directory.
You cannot pause the Document Generator from the command line as you can when using the GUI. Only one Document Generator at a time can be started from the command line in a single DOS window or terminal window.
Note | If you run Activator on UNIX and there are spaces in the sender’s or receiver’s ID, we recommend using the Document Generator GUI. See Create EDI or XML test documents. |
The following table shows the command line parameters for the Document Generator. You do not have to use the parameters in the order listed.
Parameter |
Description |
Usage |
-type |
Valid document types are EDI or XML. |
Required |
-sender |
Routing ID of the sender. |
Required |
-receiver |
Routing ID of the receiver. |
Required |
-outpath |
The directory where the Document Generator writes the outbound documents. This is typically the sender’s EDI-out or XML-out directory. |
Required |
-size |
Any value between 1 and 999999 KB to indicate the size of each document you want to create. |
Required |
-ndocs |
Any value between 1 and 999999 to indicate the number of documents you want to create per unit of time. The Document Generator creates all of these documents at once. |
Required |
-docid |
The number to use as the control ID of the first EDI document to be generated. Do not use for XML documents because they do not have control IDs. |
Required for EDI N/A for XML |
-infile |
The path to the EDI document on your system that you want to use as the template for generating test documents. You can use copies of your own EDI document as the test documents rather than the test documents that Document Generator creates for you. If you use your own EDI document as the template, Document Generator copies it and inserts your specified sender, receiver and control ID. |
Optional for EDI N/A for XML |
-interval |
Any value between 1 and 999999 to indicate the time in minutes the Document Generator waits to create the next document or set of documents. If you do not use a value, Document Generator creates the number of documents specified by -ndocs once. If you use a value, Document Generator creates the specified number of documents at the specified interval until you stop the tool. |
Optional |
-maxuncon |
This is a fail-safe control to stop generating documents in the output directory after Activator has stopped consuming messages. For example, when the server has stopped running. When the number of unconsumed documents reaches this limit, the utility stops generating documents. This prevents large numbers of unconsumed messages from piling up in the output directory. |
Optional |
-h, -help or ? |
Displays a list of the parameters. (In Windows, see |
Optional |
The following are examples for running Document Generator from a command line. Be sure you run the utility from Activator bin
directory.
For UNIX, the following example shows the command line format for Company1 to create 7 EDI documents that are 3K in size every 5 minutes and place them in the EDI out directory for sending to Partner1. The control ID is 302.
./docGen -type edi -sender company1 -receiver partner1 -docid 302 ‑outpath /home/axway/ci400/data/company1/ediout -size 3 -ndocs 7 ‑interval 5 |
If you run the docGen command without any parameters, the GUI opens.
To stop the generator:
For Windows, the following example shows the proper command line format. Events related to running the tool are written to the docgen.log
in the application’s log
directory.
docGen -type edi -sender company1 -receiver partner1 ‑docid 302 ‑outpath [installation_directory]/data/company1/ediout ‑size 3 -ndocs 7 ‑interval 5 |
Press Ctrl-C in the DOS window to stop the Document Generator.
If there are spaces in the sender’s or receiver’s routing ID or out directory name, place the IDs or directory name in quotation marks so Windows properly handles the spaces.