Kofax Communications Manager Batch & Output Management Scripting Language Developer's Guide
The CCM_DoRegistration script calls the RegisterRequest function and monitors the result:
• If a request file is processed successfully, the script ends.
• If no request file is found, the script waits five seconds, and then ends.
• If an exception marked as Handled is thrown, the script ends.
• If an exception is thrown that is not marked as Handled, the script throws an exception.
When the script ends normally, the surrounding loop immediately calls the script again. Therefore, as long
as request files are available, they are picked up one by one without delay. If no request file is available,
the next check is delayed for five seconds.
Surrounding loop
The surrounding loop continues indefinitely until the process receives a Stop or Cancel signal, or the
CCM_DoRegistration script throws an exception. As long as the CCM_Registration process is running,
request files are continuously picked up from the watch folder.
Note It is only safe to run multiple registration processes simultaneously if they are monitoring different
watch folders. When the same watch folder is monitored, a single request file may be registered in the
database more than once, leading to duplicate output.
2: CCM_Application
The process has this structure:
1. Loop body script, or the CCM_DoApplication script, which relies on the ProcessRequest function of
the Application component for processing a single request record. The order to process the request
records is not determined. For more information on ProcessRequest, see ProcessRequest function.
2. Surrounding loop, which ensures that the CCM_Application script is called repeatedly.
Loop body script
The CCM_DoApplication script calls the ProcessRequest function and monitors the result:
• If a request record is processed successfully, the script ends.
• If no request record is found, the script waits five seconds, and then ends.
• If an exception marked as Handled is thrown, the script ends.
• If an exception is thrown that is not marked as Handled, the script throws an exception.
When the script ends normally, the surrounding loop immediately calls the script again. Therefore, as
long as request records are available, they are picked up one by one without delay. If no request record is
available, the next check is delayed for five seconds.
3: CCM_Communication
The process has this structure:
1. Loop body script, or the CCM_DoCommunication script, which relies on the
CommunicateCorrespondence function of the Communication component for processing a single
correspondence. The order to process the correspondences is not determined. For more information
on CommunicateCorrespondence, see CommunicateCorrespondence function.
11