Importing selected artifacts and metadata

The import process follows the same process and validation as typical creation of the document. This ensures that badly formed import/export files will not cause problems for the registry. Any deviations from usual process and validation are explained in this section.

About this task

The difference with import is that the file for import will contain not only the original document but its full WSRR representation, with all supporting documents, relationships, user-defined properties and classifications. These will also get created in the same transaction.

The document explicitly exported must not exist in the registry on import as this has the same effect as trying to create an already existing document. Supporting documents can, however, already exist in the registry and the import will attempt to find these supporting documents and use any existing ones in place of those in the import file. As a result, the document imported will match that in the import/export file at the top level; however, as relationships are followed down the graph, documents might be encountered that already exist in the repository. Import will not alter these pre-existing supporting documents so importing a document can only result in the creation of new documents or relationships to existing ones; it will not result in the altering of an already existing document.

If it is required that the import/export file exactly matches the registry after import, then either none of the supporting documents must exist in the repository, or each supporting document must have been previously imported.

Any logical objects included in the import file are used to update logical objects created through the usual creation process. Therefore, for the purposes of import, if these logical objects are not present in the import file then the import will go through the usual creation process and they will be created anyway. If the logical objects are present in the import file then any user-defined properties, relationships, and classifications can be added to the created logical objects during import. Modelled properties will not be overridden.
Note: Logical objects are also referred to as logical derivations. For more information, see Logical derivations.

The following examples illustrate the process:

Results

When you import an object, its creation timestamp is changed from its original value to the current date and time.

Example

  1. A is related to B:
    • If A is exported then B will be exported as a supporting document
    • If the export file is then imported into a registry that already contains B, A is created and the relationship is set up to the existing B, which remains unmodified. The supporting B in the import file is not used so any user-defined metadata on B in the import file is not set on the existing B in the registry.
  2. A is related to B, and B is related to C:
    • If A is exported then B and C will be exported as supporting documents.
    • If the export file is then imported into a registry that already contains B, A is created and the relationship is setup to the existing B, which remains unmodified. The supporting B in the import file is not used so any user-defined metadata on B in the import file is not set on the existing B in the registry. C is also created because it was originally related to A through B but the existing B is not updated because the relationship B to C might not be valid in this new registry. However, because C is created it is possible to manually create this relationship from B to C after the import has completed.
  3. A logical object of A (logA) is related to a logical object of B (logB):
    • If A is exported then logA will also be exported. Because logA is related to logB, B will be exported together with logB as a supporting document.
    • If the export file is then imported into a registry that already contains B and, consequently, logB, then A is created, and the logA that is created as a result of creating A has a relationship set up to the already existing logB. B and logB remain unchanged. The supporting B and logB in the import file are not used so any user-defined metadata on B in the import file is not set on the existing B in the registry.

What to do next

Importing selected artifacts and metadata is described in the following subtopics: