Skip to main content
Version: Latest (4.60.0)

Transformation (1b. Structure Mapping)

note

Warning: this flow will overwrite the target field when flow variable resetTarget has been set to true! Before running this flow, make sure the source.ancestors have been calculated. Check in the documentation of the source accelerator if it already calculates the ancestors. If not, use the Calculate Ancestors accelerator.

When a system has been used for many years, chances are that part of the content is no longer needed. The scope should be defined so only the content that is needed will be migrated. The structure mapping flow applies the defined scope to the content in the source system by setting migration.migrate to true for the objects that are in scope. The structure mapping flow is a generic flow that can be used for any source and target system, as long as the mapping of source folders to locations in the target system is defined in an Excel workbook. This flow reads an Excel workbook containing the mapping of source folders to locations in the target system, also called a structure mapping. Enter as many mappings as needed; one source container to one target container per row in the Excel file. All descendants of each source container are automatically mapped as a result. Furthermore, when resetTarget is set to true the source object will be copied to the target object without the source.properties. This is usually where the metadata fields reside, but those will be mapped later. Afterwards, each row in the mapping will be used to set migration.migrate to true for the mentioned objects. The Excel column values will be saved on all the mapped objects in migration.mapping. The structure mapping flow processes the mapping in the order of the rows in the Excel sheet. This means that if a parent folder is mapped after its child, the mapping of the parent folder will overwrite the mapping of the child folder. Therefore, it is important to order the rows in the Excel sheet from top to bottom in the same way as the structure in the source system (starting with the root folders and ending with the leaf folders).

An example of the structure mapping is shipped with the accelerator (Structure mapping.xlsx). The columns in this Excel file are:

  • *Source ID: Refers to the source.id of the folder that is to be migrated.
  • Source Name: Refers to the source.name.systemName of the folder that is to be migrated.
  • Source Path: Refers to the source.hierarchies[0] of the folder that is to be migrated.
  • Only contents: When set to TRUE only the contents of the folder are migrated (the folder itself is excluded).
  • Only documents: When set to TRUE only the documents directly underneath the mapped folder are migrated.
  • Target ID: Refers to the identifier of the already existing container in the target system.
  • Target Name: Refers to the name of the already existing container in the target system.
  • Target Path: Refers to the path of the already existing container in the target system.
  • Target Type: Refers to the content type of the already existing container in the target system.

The ID, Name, and Path of the source and target system refer to the values of the matching fields in the Content Store. The values can be retrieved directly from the Content Store, but it is highly recommended to use the Container Structure Report to determine these values. You'll need to generate two reports. One for the source system, and one for the (empty) target system. You can then use those two reports to determine the source and target values. The Content Store will have CONTAINER entries for all folders in the source system, while the Container Structure Report will list the containers in the first few levels from the root in an Excel sheet.

Any metadata that has to be set on all content that is migrated can be set in additional columns in this Excel sheet. In the provided example, a metadata field Branch has been added.

note

Some source systems, such as FileNet and OnBase, support documents that don't have any parent folders (also called unfiled documents). If unfiled documents need to be migrated, please create dummy folders and associate the unfiled documents with these folders by setting the source.parentIds on these records in the Content Store. Afterwards, map the dummy folders with the Only contents column set to TRUE.

Settings

mongoConnection

The Mongo connection string including the database name to connect to.

structureMappingPath

The path to the Excel workbook containing the structure mapping. The sheet containing the mapping should be named Structure Mapping.

resetReset

When set to true the target field is completely overwritten with the source value. This is required when running the transformation for the first time. When there is a need to only update the target.parentIds, this value can be set to false. In this case, target.parentIds will be overwritten with source.parentIds before the structure mapping is reapplied.