Register or unregister an instance

The /ProcessRegistrationFile command can be used to manually register or unregister an instance.

This command should only be used when registration fails during starting an instance, or when unregistration fails during stopping an instance. This may be the case, for example, in architectures that do not allow KCM instances to connect to the Contract Manager.

The /ProcessRegistrationFile command can also be used to update the available interfaces of an existing instance. In this case, use the /Register flag and omit /NewContract and /Force.

Parameters

This command has the following parameters and flags:

Parameter

Required / Optional Description
/File Required An XML file that contains information about the KCM instance.

This file can be obtained from the instance server at <deploy root>\KCM\Work\<version>\Instance_<num>\instance.xml.

/Register Optional

Add this flag to register an instance.

Mutually exclusive with /Unregister.
/Unregister Optional

Add this flag to unregister an instance.

Mutually exclusive with /Register.
/NewContract Optional

Add this flag to create a new contract upon registration.

  • With this flag, registration will fail when the contract already exists.
  • Without this flag, registration will fail when the contract does not yet exist.
Only valid in combination with /Register.
/Force Optional Add this flag to allow registration to take over an existing contract with an instance association.

Example

The following example demonstrates how to register an instance.

ManageCM /ProcessRegistrationFile /Register /File=c:\temp\instance.xml 

Using /ProcessRegistrationFile on old KCM instances

It is also possible to use the /ProcessRegistrationFile command for KCM instances of version 5.4 or lower. For these old instances, the instance registration file must be created manually. The format of this file is as follows:

<?xml version="1.0" encoding="utf-8"?>
<Registration Version="1.0" xmlns="urn:KCMRegistration1">
  <Instance>
    <Partner>%Partner%</Partner>
    <Customer>%Customer%</Customer>
    <Host>%InstanceHost%</Host>
    <Number>%InstanceNumber%</Number>
    <ValidationId>%ValidationId%</ValidationId>
    <LoadBalancerPort>%LoadBalancerPort%</LoadBalancerPort>
    <RepositoryPort>%RepositoryPort%  2587</RepositoryPort>
    <RepositoryInternalPort>%RepositoryInternalPort% 12587</RepositoryInternalPort>
    <ComposerPort>%ComposerUIHTML5Port%</ComposerPort>
    <DesignerPort>%DesignerWebPort%</DesignerPort>
    <OnlineJ2EEPort>%ComposerUIJ2EEPort%</OnlineJ2EEPort>
    <UseComposerUIForJ2EE>%UseComposerUIForJ2EE%</UseComposerUIForJ2EE>
  </Instance>
</Registration>

The values for the placeholders can be obtained as follows:

Placeholder How to obtain the value

%Partner%

%Customer%

%InstanceHost%

%InstanceNumber%

Use the contract with which the instance is registered.

%ValidationId%

Use the ValidationID setting in the [Configuration] section of the dp.ini file.

%LoadBalancerPort%

Calculate as %BaseCorePort% + (2 * %InstanceNumber%) + 1. (See the second to last item for value of %BaseCorePort%).

%RepositoryPort%

Calculate as %BaseDesignerPort% + %InstanceNumber%. (See the second to last item for value of %BaseDesignerPort%).

%RepositoryInternalPort%

Calculate as %RepositoryPort% + 10000.

%BaseCorePort%

%BaseDesignerPort%

%ComposerUIHTML5Port%

%ComposerUIJ2EEPort%

%DesignerWebPort%

See the ManageCM.exe.config file.

%UseComposerUIForJ2EE%

Use True if the instance uses ComposerUI for J2EE instead of ComposerUI for HTML5. Otherwise, use False.