Export scripts

Export behavior

Collections are exported into Documents. This export can be:

  • Complete: All Objects are exported to the export files.
  • Partial: some of the Objects are extracted and moved to a new “child” Collection. The child collection has a parent property that keeps the link with the parent original property. The child collection is then exported as a whole. This mechanism enables you to keep track of the Collections that have been exported.

The filters that can be used are expressions that are composed of a conjunction of tests where each test is expressed as <prop> <operator> <value>.

The possible operators are:

  • is null, not null
  • like, not like
  • =, !=, >, <, >=, <=
  • in { <v1> , <v2>}

Values must be written between double quotes.

If files have been imported into the same Collection via the Merge import mode, then the product regenerates the same files during export. These files contain the same objects as at import time. An additional file contains the newly created Objects.

If this behavior suits you, leave the Export file name of the Collection Type empty to prevent the file names to be overwritten. A default file name is given to the files. If you want all the Objects to be stored in the same file, then set the Collection Type to Overwrite existing file property to No. Instead of overwriting each other, files will be appended in a unique export file.

Export scripts

Script Description
exportDocuments

Export Collections to files.

A filter defines the Collections to export.

Parameters

  • ExportDocsByFilterDirectoryPath: target location of the files to export.
  • ExportDocsByFilterConditionFilter: expression used to filter the collections to export.
    Example: collection.bpi=”100” AND MODIFICATION_AUTHOR=”user”
  • ExportDocsByFilterTargetStatus: if this parameter is set, change the status to the specified value after importing the collection.
partialExportDocuments

For each collection to export, it creates a child collection that contains filtered Objects, and then exports each child collection into a file.

Parameters

  • PartialExportDocsBCollectionsFilter: expression used to filter the collections from which to create a child collection.
  • PartialExportDocsBObjectsFilter: expression used to filter the Objects that will be moved to the child collection. Example: LYFECYCLE_STATUS=”2”.
  • PartialExportDocsTargetBCollectionsFilter: filter expression for filtering the target collections in which the partial data will be moved
  • If the filter matches exactly one collection, move all filtered Objects to it (no new collection is created).
  • PartialExportDocsDirectoryPath: path to a directory into which the server will export the child collections.
  • PartialExportDocsTargetStatus: LifeCycle name or id used for changing the status of the target collections.
  • PartialExportDocsPerformExport: confirmation for exporting the target collections
  • The export operation is applied on the whole target collection. If the target collection was not empty, it is possible to export Objects (provided they match the PartialExportDocsBObjectsFilter) that were part of the target collection before the export command.
  •  

Related Links