When sending a request to the contract manager API, you receive a response with the following error:
The requested interface (name:'', version:'') is not available for the contract (partner:'',customer'', contracttype(name:'', version:''))
This error occurs when the requested interface is not available for the used contract. In general this happens in two different scenarios.
- The used contract type is not added to the used contract. An interface is part of a contract type. The contract type is not added to the contract.
- The contract type is not available and the contract type is not added to the contract. A contract type is a collection of interfaces. An interface is a mapping to a Core script. If all interfaces (Core scripts) used by a contract type are not available on the instance, then the contract type itself is not available for this instance.
Managing the contract manager
Managecm.exe is used to manage the contract manager. This command line program is located in <root>\KCM\Programs\<version>\Management\. (or <root>\CCM\Programs\<version>\Management\ (for versions older than 5.3).
The tool is fully described in the "Getting started guide". To access the latest Getting Started Guide, go to https://docshield.kofax.com/complete-list.htm and follow the link to Kofax Communications Manager.
For KCM 5.3 and older append "database!user=<db_user> database!password=<db_password>" to all example calls. The db_user and db_password are the the login and password for the SQL Account for accessing the contract manager database.
For example you receive the following error:
The requested interface (name:'system.check', version:'v1') is not available for the contract (partner:'CCM', customer:'Local2', contracttype:(name:'CCMInteractive', version:'V2'))
The error provides the following information:
- The used interface is system.check. Normally the corresponding Core script has a similar name.
- The contract is CCM, Local2.
- The requested interface system.check version V1 belong to contract type CCMInteractive V2.
- To check if the contract type is added to the contract run "managecm.exe /listcontract /partner=<partner> /customer=<customer>":
managecm.exe /ListContract /partner=CCM /customer=Local2
========================== Contract: - Partner : CCM - Customer : Local2 - Export : Disabled - Import : Disabled - Application : ComposerUI HTML5 Contract Types attached to this Contract: - CCMInteractive V1 Instances associated with this Contract: - active KCM54 instance 02 ==========================
As we can see, the contract type CCMInteractive V2 is not added to the contract. For this reason the error occurred.
- Before adding the missing contract type, we must check if the contract type is available using "managecm.exe /registerinstance /instance=<instance number> /host=<hostname of KCM instance> /update":
managecm.exe /RegisterInstance /instance=2 /host=KCM54 /update
========================== ... Contract Type CCMInteractive (V2) is available ... Updating Instance KCM54_core_02. Updating contract information for CCM_Local2. Updated dispatch info for contract CCM_Local2. Removed existing Contract Types for Instance KCM54_core_02. Registering Contract Types for Instance KCM54_core_02. ==========================
As we can see, the contract type is available. If the contract type is not available, then the output would show:
Contract Type CCMInteractive (V2) is not available
To make a contract type available, you must deploy the interfaces (Core scripts) which are used by the contract type. After making the interface(s) (Core scripts) available for the Instance, you must run the above command again ("managecm.exe /RegisterInstance /instance=2 /host=KCM54 /update").
After verifying the desired contract type is available, we can add it to the contract using "managecm.exe /AddContractTypeToContract /name=<contract type> /version=<contract type version> /partner=<partner> /customer=<customer> /force":
managecm.exe /AddContractTypeToContract /name=CCMInteractive /version=2 /partner=CCM /customer=Local2 /force
- Subsequently the configuration of the contract manager must be reloaded with "managecm.exe /reloadconfiguration":
- The interface is now available for the contract. The problem request can now be processed.
Determining why a contract type is not available.
As mentioned before, a contract type is not available until all interfaces (Core scripts) from a contract type are available on the instance. To check what Core scripts are used by a contract type you can run "managecm.exe /ListContractType /name=<Contract type name> /version=<contract type version>":
managecm.exe /ListContractType /name=Postprocessing /version=1
Contract Type ------------- Postprocessing (V1) Included Interfaces ------------------------------------------------------------ Name Version Type Core Script Session ------------------------------------------------------------ ConcatDocumentPack V1 core ConcatDocumentPackV1 none DocToPDF V1 core DocToPDFV1 none ------------------------------------------------------------
In this example, we can see that the contract type contains two interfaces (ConcatDocumentPack and DocToPDF). These interfaces are mapped to the Core scripts ConcatDocumentPackV1 and DocToPDFV1. As soon as these Core scripts are available on the instance associated with your contract, you can run"managecm.exe /registerinstance[...]" to confirm the contract type is available. After that you can add the contract type to the contract.
Level of Complexity
|Kofax Customer Communications Manager||5.2 and earlier||n/a||n/a||n/a|
|Kofax Communications Manager||5.3 and newer||n/a||n/a||n/a|
Article # 3035732