Document Routing capability was introduced in KTM 5.0, and requires Kofax Capture 9.0 or higher. This article contains information current as of KTM 5.0. Please see the Scripting Help topic Configuring Batch Operations ¦ Routing Batches, Folders and Documents for new features added in KTM 5.5, such as routing folders or routing to a separate Batch Class.
- Exception Documents
A Batch of 100 Documents contains 98 Documents that are valid after the KTM Extraction Server. The 2 invalid Documents cause the whole Batch to go to the KTM Validation module, which will 'hold up' the 98 Documents that are valid from being processed further. The invalid Documents can be routed to the Validation module and the valid Documents to the Export Connector.
- Document Types
Once a Batch has been processed by the KTM Server, Document Routing can be used to split the Batch and send different Document types to different Validation modules.
Document Routing makes use of the following KTM XValues:
KTM_DOCUMENTROUTING_BATCHNAME_<PlaceHolder>(Root XFolder Object) <PlaceHolder> = Child Batch or Target Batch.
KTM_DOCUMENTROUTING_QUEUE_<Placeholder>(Root XFolder Object)
KTM_DOCUMENTROUTING_QUEUE_THISBATCH(Root XFolder Object)
THISBATCH= Parent Batch, i.e., the Batch that is going to be split, or rerouted.
- Child Batch definition
This is the target Batch for Documents that are to be selected and placed in this Batch.
- Automatic/explicit Batch naming
pXRootFolder.XValues.Set("KTM_DOCUMENTROUTING_BATCHNAME_" & <PlaceHolder>, sExplicitBatchName)
This will give the child Batch an explicit name.
Step 1 has be performed before Step 2.
- Child Batch routing
pXRootFolder.XValues.Set("KTM_DOCUMENTROUTING_QUEUE_" & <PlaceHolder>, sModuleName)
This will route the child Batch to the defined Kofax Capture module (sModuleName).
- Parent Batch routing
If this step is not defined, then the parent Batch, if not empty, will be routed to the next queue that has been defined in the Capture Batch Class.
If the parent Batch is empty it will automatically be removed from the Kofax Capture Batch Manager.
A combination of steps 1 to 4 can be applied depending on the use case:
- Simple Batch splitting
- Batch splitting, renaming and routing
- No Batch splitting, but just Batch re-routing
Note: All Document Routing-related XValues are discarded after they have been applied.
The routing script should consider the module (
Project.ScriptExecutionMode), instance (
Project.ScriptExecutionInstance, 1-based integer), and Batch Close Mode (
CscBatchCloseMode, used in the
Batch_Close event) such as in this example:
Batch Routing can be tested in the Project Builder.
Use the lightning icon configure option to define the Module ¦ Event ¦ Close Mode, and click on the lightening icon to execute the script:
The following example code describes how Document Routing can be used:
This code is in the example project, which can be downloaded at the end of this article.
This is a screen shot of the KTM Validation in the example project provided below.
For each Document in the original Batch, a child Batch (
sBatchTag, the target Batch or new Batch) can be defined, and in which queue (
sModuleName, the KC/KTM module in the Batch Class queue) to which the new Batch should be routed:
- Powerpoint: What's New in KTM 5.0 - Document Routing
- KTM 5.0 Document Routing Project
Level of Complexity
|Kofax Transformation Modules||
Add any references to other internal or external articles