Importing selected artifacts and metadata
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.
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
- 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.
- 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.
- 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: