Handling Files That are not Processed
A form can have a condition set on it to determine whether to process the input file. For example, if you have an alternative process for invoices to Canada, you can set a condition not to process invoices for businesses in Canada, as documented in Creating a Project with Conditional Forms.
Files that are evaluated, including invoices for businesses in Canada, are dispositioned the same as other files, which is usually to append .hld to the file name or to delete the file, unless an exception has been configured. Appending .hld to a file or deleting a file stops eFORMz from evaluating the file again.
You can set up an exception-handling process to keep files unchanged that were not processed, such as the Canadian invoices. This process includes the use of global variables. If the processing condition is not met, the file is kept in its original state. The file is not deleted, and its extension is unchanged, so it is picked up for processing the next time the Director checks for files to process.
Variables with special meanings
The following two global variables have special meanings in eFORMz. You must create them in your project before you refer to them. The “Pass last value to Queue Monitor” must be checked in the definition of the global variable, as shown below:
ProjectStatus: If you include this global variable in your project, and its value is set to abort, the Director immediately stops processing the current file. The file is not renamed with a .hld extension, and the file is not deleted. To do this, you would create the ‘AbortProcessing’ variable in the project. Using conditional logic, set the variable to “abort” if you want the system to not process the file. Note: Aborts will fire the Director function to disable the queue. You need to make sure the system settings for the director will allow for multiple aborts.
QMComponentFiles: This is the current list of files to process.
Caution: In eFORMz 11.02.05 and earlier, ProjectStatus = abort counts towards the alert limit. Using ProjectStatus this way can result in a queue being shut down when it reaches the alert limit. More information is available at Customizing Director Alert Limits.
Configuring an Exception
The abort sample project (download now) demonstrates how to set up an exception test within your project. The example uses the two special global variables, ProjectStatus and QMComponentFiles. The input file is a PDF file, and it is matched to a ZPL file with the same name. For example, SO1234.pdf and SO1234.zpl.
In a typical project, the PDF input file is renamed with an extension of .hld or deleted after it is processed. In this project, the procedure leaves the PDF file unchanged if the corresponding ZPL file is not found. This sample project includes two post-condition procedures:
- ZPL file found is run if the ZPL file that goes with the PDF file is found. The variable QMComponentFiles is set to the file name, and the project finishes processing.
- No ZPL file is run if the ZPL file is not found. The variable ProjectStatus is set to abort, and the Director immediately stops processing the input PDF file. It it not renamed or deleted.