ElectronicDelivery

To configure the CCM_ElectronicDelivery standard process, you need to customize the ElectronicDelivery.dss script in the KCM Core instance configured on the system.

The script resides here: [drive]\KCM\Work\<version>\Instance_<number>\core\Scripts\User Library. To edit the script, use the built-in script editor. To compile the changed script and restart the Document Processors, use KCM Core Administrator.

The ElectronicDelivery.dss script runs in a session where the Document Pack, which contains the documents for the electronic communication, is opened.

The script requires the following parameters:

  • Channel. String. Channel name.

  • Metadata. String. Full path to the Metadata XML. This XML file conforms to the CcmBomElectronicCommunicationMetadata XSD.

The script handles the complete distribution of the electronic communication. If the script throws an error, the electronic communication is put into an error state.

Batch & Output Management may produce a modified Document Pack that may not comply with the definition of the Document Pack Template used as the basis for the Document Pack. This introduces the following limitations:

  • You cannot submit such a Document Pack for processing to KCM.
  • Some script operations are not supported for such a Document Pack:
    1. CopyDocumentPack
    2. SaveDocumentPack
  • The Document parameter passed to the IterateDocumentPack command running on a modified Document Pack may contain the value "*none", which indicates that this slot was explicitly made empty for the given channel.

The following operations and functions can be used on a modified Document Pack that may be produced by B&OM:

  • IterateDocumentPack command
  • get_document_from_pack, get_slots_from_pack, and get_channels_from_pack functions

For information on these commands and functions, see the Kofax Communications ManagerCore Scripting Language Developer's Guide.

Here is an example of the ElectronicDelivery.dss script.

/*
 * B&OM Electronic Delivery exit point.
 *
 * This script will be called whenever a channel is configured for electronic
 * delivery.
 *
 * The content of the Document Pack is already activated and can be manipulated
 * using the standard Document Pack APIs.
 */

Parameter Text Channel;		/* Name of the selected channel */
Parameter Text Metadata;	/* Full path to the Metadata XML */

/* Document Pack manifest file */
Const Text ManifestXML = "manifest.xml" [ _document_pack, ];

IterateDocumentPack
	Script (ListSlots)
	Channel ("")
	Context ("");
Example script (ListSlots):

Parameter Text Slot;
Parameter Text Document;
Parameter Text Status;
Parameter Text Context;

If Document <> "*none" Then
  Progress Message ("--------------------> " + Slot);
Fi;

General rules for ElectronicDelivery

By default, the electronic delivery script for Batch & Output Management cleans up the KCM Core sessions. To retain sessions for debugging, add the following parameter to the dp.ini file:

[Debug]
          BOMPersistSession=Y

The configuration change comes into effect immediately and does not require restarting the Document Processors. This change also applies to the Communication and Distribution processes.

When sessions persist, you must remove the session directories manually, because Batch & Output Management does not remove them.