Load Text Blocks

Using this tool may cause irreversible changes in the KCM Repository installation. Make sure that you make a backup of the database before using it.

tbmigrate /load 
          /folder=<folder> 
          /project=<project>
          [/target=<target folder>] 
          [/subfolders]
          [/unlock | /accept] 
          [/description=<description>]
          [/server.host=<host> /server.port=<port>]
          [/user=<user> /password=<password> /token=<token>]

Use the parameters and flags as follows:

  • <folder> Required. Represents the folder containing the Text Block XML files.
  • <project> Required. The name of the KCM Repository project into which the Text Blocks are imported. This project must already exist. Text Blocks will be loaded into the top-level folder Text Blocks of this project, while Field Sets are created in the top-level folder Field Sets.
  • <target folder> Optional. Specifies the name of a folder beneath the folder Text Blocks. If given, the Text Blocks are loaded into this folder. The folder is created if it does not yet exist. This option has no effect on the location where the Field Sets are stored.
  • /subfolders Optional. If present, the program loads Text Blocks into subfolders in KCM Repository according to the subfolders of the input folder where they are loaded from. The folders are created if they do not exist yet. If this flag is omitted, also the Text Blocks found in subfolders of the input folder will be loaded into the folder Text Blocks or to <target folder>. This option has no effect on the location where the Field Sets are stored.
  • /unlock and /accept Optional. The flags request that the loaded Text Blocks and Field Sets are unlocked (/unlock) or unlocked and marked as [accepted] (/accept). If neither is used, the loaded objects remain [in development] and locked by the loading user.
  • /description=<description> Optional. Specifies a description to be added to the imported objects and revisions. If this flag is not present, the default description "Imported from <filename>" is used. To add no description to the loaded objects, you can leave the parameter <description> empty.
  • <host> / <port> Required (usually provided in the itprep.ini file). Provide the host name and port of the KCM Repository server.
  • <user> / <password> When the LDAP mode is disabled, specify the user name and password for the KCM Repository user account to perform the import. If you omit the user name and password, the tool attempts to use the current Windows user account. The Text Blocks and Field Sets created or change by the import are locked by the specified or detected user. For more information, see the Kofax Communications Manager Repository Administrator's Guide.
  • <token> When the LDAP mode is enabled, specify the logon token generated with KCM Designer. For more information, see KCM Designer Help.

The program validates all Text Block XML files before any content is loaded into KCM Repository. If during this check any errors are encountered, no Text Blocks are loaded.

Text Blocks are created if they do not exist yet. If an imported Text Block is already present, a new revision is created for it. In that case, it should not be locked by another user. If the Text Block was locked by the user account used for performing the import, the existing [in development] revision is overwritten.

The Text Blocks are loaded into the top-level folder Text Blocks of the target project, unless /target or /subfolders is specified. When checking for existing Text Blocks, only those residing in the appropriate target folder are considered.

Text Blocks are searched for Fields and Field Sets.

Fields and Field Sets that do not exist yet are created. Field Sets that are already present receive a new revision. In that case, they should not be locked by another user. If a Field Set was locked by the user account used to perform the import, the existing [in development] revision is overwritten.

The Field Sets are loaded into the top-level folder Field Sets of the target project. When checking for existing Field Sets, only those residing in this top-level folder Field Sets are considered. Usage relationships between Text Blocks, Fields, and Field Sets are created, too.

When the program is finished, all imported objects remain locked, unless the /unlock or /accept flag is provided.

Rich Text Blocks are not checked for Fields and Field Sets. No Fields and Field Sets are created when loading a Rich Text Block.

The user account must have sufficient authorization to perform all tasks required during the import. The following rights are required:

  • Create and edit Text Blocks on the folder Text Blocks
  • Create and edit Field Sets on the folder Field Sets
  • Edit Text Blocks on pre-existing Text Blocks that are overwritten by the import
  • Edit Field Sets on pre-existing Field Sets that are expanded by the import
  • Unlock Text Blocks and Field Sets, if the /unlock or /accept flag is given
  • Mark Text Blocks and Field Sets as [accepted], if the /accept flag is given
  • Add characteristics

After loading, the file migratetextblocks-report.txt is written. This file contains a brief account of the loading process, as well as any errors encountered.

Return codes

If importing or checking is successful, 0 (zero) is returned as error code. The following codes are returned in case of an error.

Error code Description
1 One or more of the Text Blocks to be imported contain errors.
2 A file name is malformed.
3 A Text Block name is invalid; a file name cannot be used as Text Block name.
4 The validator program tbval.exe was not found. Check that it is in the same folder as tbmigrate.exe.
5 Field Set name is not valid.
6 Field name is not valid.
7 User has insufficient authorization.
8 Unable to unlock object. Usually indicates that someone is using the object.
9 Required command line parameters were missing.
10 An unexpected error occurred. This may include authentication or authorization failure, a missing project, and others.
11 Unable to lock object. Usually indicates that someone is using the object.