Specify a Post-processing Command

$post_process command method

This command is used to indicate that post-processing is required for any outbound fax on demand requests that are created for this user. For a callback request, CopiaFacts creates from this command a $fax_post-process command in an FS file. You may specify up to eight separate pre-process operations, and multiple operations with the same method of processing will be performed in sequence.

In a .USR file, this command has no effect on fax broadcasts nor on any server operations using externally generated FS files. It only affects the contents of a callback FS file generated from a fax on demand or fax mail retrieval request.

In a .UJP file, using this command is equivalent to specifying the $fax_post-process command in every FS file of the job.

Post-processing occurs after a previously requested image or list of images have been delivered or all attempts to deliver the image(s) have failed. Post-processing allows you to "hook" into the outbound fax delivery process. You might use this option to initiate notification procedures after a fax has been sent. Or you might create a procedure to perform additional processing if the maximum number of attempts have failed.

The parameters on this command are used as follows:

command the name of an operating system command, program, or batch file that will be executed to initiate post-processing; or an infobox name for infobox method processing. A program or batch file name must have a file extension if its extension is not .EXE. Operating system commands should be preceded by CMD /c.
method one of the following keywords:
internal COPIAFACTS will invoke (spawn) the specified post-processing command with the following program arguments:

The full name of the FS file to be processed

The FS file number only with no extension

The call number of the call creating the FS request

The directory containing the TOSEND, SENT, and FAIL directories

The retry outcome class letter for the most recent attempt

The fax error code ($fax_status2) for the most recent attempt

internalNT internal post-processing will be done as for the internal keyword, but the FS file will not be selected for processing on a system which is not running under Windows. No other pre- or post-process should specify the internalDOS method, or FS file will not be processed.
internalDOS internal post-processing will be done as for the internal keyword, but the FS file will not be selected for processing on a system which is not running under DOS. No other pre- or post-process should specify the internalNT method, or FS file will not be processed.
FFEXTERN post-processing will be performed under the control of the FFEXTERN process manager. FFEXTERN handles the detection and selection of files which require post-processing and calls a supplied or user-written program to perform the processing.
external post-processing will be performed by some external process (not supplied), running either on the COPIAFACTS machine or on another machine on the network.
FFCLIENT post-processing will be performed by FFCLIENT and the FS file will be placed in the PSPLOCAL subdirectory of the owner directory under USERJOBS so that FFCLIENT will detect it. The user profile must be a UJP file.
infobox control will pass to an infobox sequence, which MUST be terminated by a transfer to state IIF_PROC_COMPLETE (s191), after the final SENT or FAIL disposition is known. Either $next_box or $chain can be used to transfer to this state.
infoboxall control will pass to an infobox sequence, which MUST be terminated by a transfer to state IIF_PROC_COMPLETE (s191), after every transmission attempt. Either $next_box or $chain can be used to transfer to this state.
infoboxend control will pass to an infobox sequence, which MUST be terminated by a transfer to state IIF_PROC_COMPLETE (s191), after the FS file has been written to SENT or FAIL. This allows the final FS file to be archived.  Either $next_box or $chain can be used to transfer to this state. Variables set with $set_var in the postprocess infoboxes will not be saved in the FS file.

Internal pre-processing has the disadvantage of suspending fax and voice operations on the channel for the duration of the pre-processing. You may change the current drive or directory during the execution of your 'internal' program or batch file and they will be restored by COPIAFACTS on return.

An external process must monitor the outbound request files to determine which requests it must process. It should examine the $fax_post-process command in the request file for a match on the name of the post-processing command and method (external). The $fax_status1 command line must have a status of 4 (awaiting post-processing) before the post-processing program can process it. After accepting the request for processing, the post-processing program should change the status to 5 (post-processing in progress). Upon completion, the status should be changed to 6 (completed).

Infobox postprocessing can be used for operations such as calling an external DLL or program from an infobox. The user profile or user job properties file referenced from the FS file must have one or more $script_locn commands to locate the infobox file(s). Your infobox logic must finish by transferring to state 191 (IIF_PROC_COMPLETE). You may assign a value (minutes) to POST_DELAY to cause the FS file to be retried, but you can not currently change its disposition between SENT and FAIL. Voice operations within your infobox sequence will be ignored, and transfer to any other state may cause unpredictable results. The FS_... system variables contain specific data pertaining to the active FS file, but any valid system variables may also be used. Any program or DLL called from an infobox sequence other than types internal or infoboxend should not attempt to modify the FS file other than via the FS... variables.

Although you may specify multiple post-process operations, some limitations apply: only the first infobox or infoboxall postprocess is performed, and only the first infoboxend postprocess is performed.

Default: none (optional feature)

Examples:

Handle post-processing internally by calling a command. CopiaFacts runs the REPORT batch file for 00001234.FS with call number 12345678.

$post_process "report" internal

The above command executes the REPORT.BAT file (or EXE file) as follows:

REPORT \\FFSERVER\COPIA\FAXFACTS\CALLBACK\TOSEND\00001234.FS 00001234

 12345678 \\FFSERVER\COPIA\faxfacts\callback B 302

Handle post-processing externally using POSTPRO program.

$post_process "postpro" external