Move documents or folders to a child batch

After the Batch_Close event the documents and the subfolders on the first level in the root XFolder are checked for XValues configuring the Document Routing functionality. If XValues with the key KTM_DOCUMENTROUTING exist, their values define string placeholders that represent one ore more child batches. Each unique string placeholder implicitly creates a child batch and the documents or folders that share the same string placeholder as value, are routed to the same child batch. The assignment of the XValues can happen in any appropriate event including the Batch_Close event.

The following keys can be used for moving documents, folders, and for controlling child batch properties:

KTM_DOCUMENTROUTING

The parent object for this key is XDocInfo.

Unique identifier (<PlaceHolder>) of the child batch the document is moved to, this name is not used as name for the batch.

KTM_DOCUMENTROUTING

The parent object for this key is the fist level of XFolder.

Unique identifier (<PlaceHolder>) of the child batch the folder is moved to, this name is not used as name for the batch. These XValues are only recognized for folders on 1st level, all XValues set to dependent objects are ignored if set.

KTM_DOCUMENTROUTING_BATCHNAME_<PlaceHolder>

The parent object for this key is Root XFolder.

Name of the created child batch that is getting visible (optional). If this batch name is already existing it is extended to make it unique (where <PlaceHolder> is the unique identifier of the child batch that is already used for moving documents or folders). If the batch name is not defined a unique name is created automatically.

KTM_DOCUMENTROUTING_NEWBATCHCLASS_<PlaceHolder>

The parent object for this key is Root XFolder.

Name of the batch class the child batch is assigned to (where <PlaceHolder> is the unique identifier of the child batch that is already used for moving documents). Routing folders is not supported when this XValue is present.

The XValue KTM_DOCUMENTROUTING can be attached to documents or to folders on the first level, it is ignored for folders on all deeper levels. If a folder on the first level has this XValue set the folder with its complete sub structure is moved to the defined child batch, routing information for all documents in that moved folder is ignored.

After the Batch_Close event the documents and the subfolders on the first level in the root XFolder are checked for XValues configuring the Batch Routing functionality. If XValues with the key KTM_DOCUMENTROUTING exist, their values define string placeholders that represent one ore more child batches. Each unique string placeholder implicitly creates a child batch and the documents or folders that share the same string placeholder as value, are routed to the same child batch. The assignment of the XValues can happen in any appropriate event including the Batch_Close event.

Defining the Child Batch Name

If you want to set the child batch name explicitly by script, you need to define another XValue with the key KTM_DOCUMENTROUTING_BATCHNAME_<Placeholder> on the root XFolder level with the value that should be used as the name for the child batch. For example, the key KTM_DOCUMENTROUTING_BATCHNAME_BATCH1 ErrorBatch with the value names the created child batch to ErrorBatch. If the given batch name already exists in the Kofax Capture batch list, it is automatically extended to make it unique. If the batch name is not set explicitly, the name of the child batch is created using the name of the parent batch and extending it to make the name unique.

Setting the Batch Class of the Child Batch

By default, a child batch inherits its parent's batch class. If you want the child to have a different batch class, you need to define another XValue with the key KTM_DOCUMENTROUTING_NEWBATCHCLASS_<PlaceHolder> on the root XFolder level with the name of the batch class that should be assigned to the child batch. In case of assigning a new batch class, the assignment of modules to the child batch are ignored. All specific document data are cleared, only OCR related data and custom XValues are kept. Document CSS is only transferred to the new document in the child batch when the property MustSynchronize is set to TRUE.

For more information refer to Accessing Kofax Capture Data - Document Data.

Not existing batch class specified

If the given batch class does not exist, the parent batch is sent to Quality Control.

Routing folders and assigning new batch class

Assigning a new batch class is only supported for routing documents not for routing folders. If folder routing is specified for a child batch for that also a new batch class is specified, Batch Routing is interrupted and the parent batch is send to Quality Control.

Skipped Batch_Close event

For child batches created with a different batch class, no additional Batch_Close event with the CloseMode parameter set to Child is fired. The reason for this is that a different project would have to be loaded to fire this event.