I have run into several scenarios where I needed my batch class to support eDocs and I needed to use Kofax Transformation Module. For example, I wanted to use the Kofax Capture Import Connector – Email, this requires that you set your batch class to allow import of eDocs. By default Kofax Capture will throw an error during publish if you set the batch class to allow eDocs and you include the KTM queues. This is for good reason as KTM will error if you try and run an eDoc through it.
Before you decide to just start altering these things, make sure you have implemented a means of removing any eDocs from your batch before it gets to KTM otherwise you will encounter errors. I typically use a Custom Module or Workflow Agent. Business logic can be applied in these places that make use of the eDoc information and then remove them from the batch.
Onward to the problem, the root of this issue is how the various KTM modules are registered with Kofax Capture. During installation of KTM the installer registers all the modules and places the .aex registration files in the Bin folder. See the KTM Server registration file below, note the bolded lines as these are the issue:
KTM Server 2
KTM KB Learning Server
Description=The Server module automatically separates a batch into documents, and then classifies and extracts information from each document (optionally groups documents into folders based on common features).
[KTM Server 2]
Description=The second Server module automatically extracts information from already separated and classified documents (optionally groups documents into folders based on common features).
[KTM KB Learning Server]
Description=Knowledge Base Learning Server is used to perform online learning.
Change the bolded lines above to:
Once you save your changes the last step is to re-register these modules with Kofax Capture. You do not need to remove the modules, you can just register them again the new changes will take affect. Go to Administration Module\Tools\Custom Module Manager. Browse to the .aex file you just modified and follow the prompts to register all the modules. Note you will need to do this same procedure for the KTMValidation.aex and KTMVerification.aex files.
You can now publish your batch class without any errors! Remember though, eDocs will still cause KTM to error so make sure to remove them prior to your batch going to KTM Server.