Repository commands

In this section, details are given on:

Import configurations into the Repository

To import configurations into the Repository, use the following command:

importAIConfiguration [-id id] [-o option] [ImportDirectory], where:

id:

Identifier of the configuration to be imported or sequenced/updated. Mostly used to sequence a configuration that already exists in the Repository.

The id must match the folder name that stores the configuration files: ImportDirectory/aiConfiguration/<aiConfigurationIdentifier>. If the id and folder name do not match, the import stops and an error message is displayed.

if the id is not specified, all the configurations files under the ImportDirectory/aiConfiguration folder are imported.

option:

Possible values:

config: it imports only the AI Enabler configuration. It imports a set ctx.mvt + mvt.mvt (and optionally export.xml).

table: it imports only the configuration of the internal tables values. It imports one or several mvt.mvt files.

If the option is not specified, it imports the configurations from the AI Enabler and the internal tables values.

ImportDirectory:

The AI Enabler configuration files must be stored in the ImportDirectory under the folder aiConfiguration/<aiConfigurationIdentifier>

The configuration files of the internal tables are stored in the ImportDirectory under the folder aiConfiguration/<aiConfigurationIdentifier>/tables

If the ImportDirectory is not specified, the default import directory is used under the structure shown above.

Sequenced AI Enabler configurations

The import command also allows importing a sequenced AI Enabler configuration. The suffixes of the configuration files correspond to the id of the sequence.

Note   The first configuration is considered base and the files names have no suffix.

Some conditions must be met to import a sequenced configuration:

  • That there is no configuration with same identifier in the repository. Otherwise an error is displayed.
  • That configuration numbers are in the right order (base, then 1, 2, etc.)and apply for both mvt and ctx files.

Export configurations from the Repository

To export configurations from the Repository, use the following command:

exportAIConfiguration [-id id] [-o option] [ExportDirectory], where:

id

Identifier of the configuration to be exported. Only the specified configuration is exported.

If the id is not specified, all the configurations files from the Repository are exported.

option

Possible values:

config: it exports only the AI Enabler configuration. If the configuration is sequenced, all the configuration updates are exported as groups of ctx.mvt + mvt.mvt (and optionally export.xml) files.

table: it exports only the configuration of the internal tables values. Since the configuration is not sequenced, only the last version is exported.

If no option is specified, the whole set of configuration — from both the AI Enabler and the internal tables values — is exported

List configurations from the Repository

To list configurations from the Repository, use the following command:

listAIConfiguration [-id id] [-o option], where:

id

Identifier of the configuration to be listed. Only the specified configuration is listed.

If the id is not specified, all the configurations files from the Repository are listed.

option

Possible values:

config: it lists only the AI Enabler configuration. If the configuration is sequenced, all the configuration updates are listed.

table: it lists only the configuration of the internal tables values.

If no option is specified, the whole set of configuration — from both the AI Enabler and the internal tables values — is listed.

Clean configurations from the Repository

To clean configurations from the Repository, use the following command:

cleanAIConfiguration [-id id] [-o option] [-from from], where:

id

Identifier of the configuration to be deleted. Only the specified configuration is deleted.

If the id is not specified, all the configurations files from the Repository are deleted.

option

Possible values:

config: it deletes only the AI Enabler configuration.

table: it deletes only the configuration of the internal tables values.

If no option is specified, the whole set of configuration — from both the AI Enabler and the internal tables values — is deleted.

from

Specifies the index from where to start cleaning the configuration sequence.

To be used only for the AI Enabler configuration.

If it is not specified, all the AI Enabler configuration updates are removed.

The export.xml file

For a given configuration, the financial export file (export.xml) is optional. If it is present in the configuration folder, it will be imported together with the mvt and ctx files. It will also be sequenced, listed, and deleted together with its corresponding configuration.

An export.xml cannot be imported by itself: if either the mvt.mvt or the ctx.mvt files are missing, the export.xml will not be imported, the import stops and an error message is displayed.

In the case of sequenced imports, it is possible for some updates not to contain an export.xml file. In that case, no corresponding export.xml file will be exported for those updates.

Example

The following example describes the use of the Repository commands.

The table below displays three AI Enabler configurations and their corresponding internal table values:

AI Enabler configuration Internal table value
aiconfig1 COA.mvt, CURRENCY.mvt, RATE.mvt
aiconfig2 COA.mvt
aiconfig3 COA.mvt, CURRENCY.mvt

The import folder must have the structure described in the picture below:

Import folder structure

If some updates are needed, the exported configuration folder will have a specific structure. In the example below, the configuration config1 has a base version containing an export.xml, an update without export.xml, and a second update with export.xml; config2 has one update; config3 has no update.

Export folder structure

To clean only the last update of the first configuration, run the following command: cleanAIConfiguration -id aiconfig1 -o config -from 2

Related Links