Question / Problem:
How can I launch a Custom Module from Batch Manager?
Answer / Solution:
Custom Modules are registered to Kofax Capture through their ACM/AEX file. This lets Kofax Capture know the executable name of the Custom Module. Any Custom Module that wishes to be launched by Batch Manager, with the selected Batch loaded automatically, must custom code this functionality into the Custom Module.
There are two basic items that need to be accounted for in this instance:
- The call to the Custom Module Application
The call to the Custom Module application will come as a command line similar to:
MyCustomModule.exe -B1032 -W104339 -M23423This call from the Batch Manager consists of:
MyCustomModule.exe -- The executable name. -B1032 -- The Batch ID of the selected Batch in the format "-B<Batch ID in decimal format>". -W104339 -- The Windows Handle of Batch Manager. -M23423 -- The Message ID for the Windows Handle to use.The Windows Handle and Message values are used for signaling Batch Manager that the Batch processing is complete. You can use the Windows API to send a message back to the Windows Handle with the corresponding Message ID.
- Open the Batch
This is the easy part. Simply look in the BatchCollection for the Batch ID parsed from the command line parameters and open that Batch.