Create and deploy a Core scripting library
It is possible to pack the functionality of a number of core scripts in a Core scripting library and deploy this easily on a KCM instance. Such libraries are typically used to deploy Contract Manager interface implementations to the appropriate instance. The section below explains how to create such a library.
To create and deploy a Core scripting library, you need to have the following:
- The Script.exe creating tool to create a
KCM Core
script library.
1. To locate the tool, navigate to:
<deploy root>\KCM\Programs\<KCM version>\ITP Server\bin
On the list with installed executables, find script.exe.
2. Copy script.exe to your desired destination. Example C:\CreateLibrary
-
Scripts to add. Create a folder for the scripts to add. Example C:\CreateLibrary\Scripts
You should store scripts as .dss files. The name of the *.dss file must match that of the script. The content follows the rules of the Core scripting language as described in the Kofax Communications Manager Core Scripting Language Manual.
-
Exit point scripts. Exit point scripts must be stored as .dss files. The name of the *.dss file must
match that of the exit point. After you have deployed the library, all the exit point scripts must be available when you recompile your scripts.
When you make changes to exit points, make sure to recompile your script for the changes to take effect.
-
SPEC file. The SPEC file contains the following specifications needed to create a library file.
A list with constants available for use in scripts
A list with internals (scripts) to expose as available services
A list with exit points (optional)
Maximum log level for the library
Company (required)
Description
MinVersion
Library (required)
ScriptPath (required)
For more information, see the example SPEC file that resides in: <deploy root>\KCM\Documentation\<KCM version>\Resources\Examples\Core Scripting
KCM core script library (itpserver.cds)
1. Locate the KCM Core script library for the instance. All instances contain the same KCM Core script library so you do not need to repeat this for each instance. You can copy the itpserver.cds file to a new location, if needed.
2. To locate itpserver.cds, navigate to:
<deploy root>\KCM\Work\<KCM version>\Instance_01\core\Config
3. Enter the location of the file in the previously created SPEC file as library=<location>\itpserver.cds>. For more information, see the example SPEC file that resides in: <deploy root>\KCM\Documentation\<KCM version>\Resources\Examples\Core Scripting
Create a library
To create a library, execute the following command.
Script.exe –lib library.cds <spec>
where: <spec> indicates the SPEC file name that specifies the scripts to add.
A library.cds file is created. It contains the scripts listed in the SPEC file.
To create an additional library, execute the following command.
Script.exe –lib <name>.cds <spec>
Deploy a library
- Substitute the
library.cds file (see the "Create a library" procedure above) for the
library.cds file located at the instance to which you want to deploy.
To locate the library.cds file, navigate to: <deploy root>\KCM\Work\<KCM version>\<Instance_#>\core\Config
where:
<KCM version> - the installed KCM version
<Instance_#> - the instance to which you want to deploy the library.cds file.
- Restart all Document Processors for the library to become active.
- To restart the document processors, you can use KCM Core Administrator, StopInstance and StartInstance tools, or the Windows Services control panel applet. On Docker, you can also use the RestartInstanceCoreDPServices tool.
Deploy an additional library
- Place the library in the same directory as the
library.cds file located at the instance to which you want to deploy. Also, see the "Create a library"
procedure above.
To locate the library.cds file, navigate to: <deploy root>\KCM\Work\<KCM version>\<Instance_#>\core\Config
where:
<KCM version> - the installed KCM version
<Instance_#> - the instance to which you want to deploy the cds file
- Register the new library.
Before proceeding, make sure that no KCM Core Administrator is open for the instance that you want to register the new library for.
Open the dp.ini file for that instance and add the following line to the configuration section.
LibraryList = <name>.cds
To register multiple libraries, list them using a semicolon as a separator, as shown below. To locate the dp.ini file, navigate to: <deploy root>\KCM\Work\<KCM version>\<Instance_#>\core\Config
where:
<KCM version> - the installed KCM version
<Instance_#> - the instance to which you want to deploy the CDS file
You can register at most 30 additional libraries. -
Restart all Document Processors for the library to become active.
To restart the document processors, you can use KCM Core Administrator, StopInstance and StartInstance tools, or the Windows Services control panel applet. On Docker, you can also use the RestartInstanceCoreDPServices tool.