IBM FileNet P8, Version 5.2.1            

Import scripts

Use import scripts at different points throughout the import process to complete custom operations, such as modifying object permissions and properties.

You can use import scripts for the following purposes:
  • Modify the data specific to the forest, domain, server, or LDAP directory where the objects are located. For example, you can run a pre-import script that sets the user, group, and security that is assigned to an object during the post-save script operation.
  • Access and modify FileNet® P8 domain-level objects such as marking sets and permissions.
  • Access the object stores of the FileNet P8 domain to modify permissions, such as adding groups on an object store or on classes.
  • Modify the properties of an object during pre-save or post-save script execution.
  • Update workflow subscriptions with values that correspond to the workflow definitions transferred to the new environment.

Script run types

You can run one or more scripts at various points during the import process by using any of the following run types:
Pre-import
Runs the scripts one time before you import any objects that are contained in the converted deployment data set. The pre-import scripts are passed a FileNet P8 Domain interface that allows the scripts to prepare the domain or the object stores for objects that are imported from the converted deployment data set.
Pre-save
Runs the scripts on each object in the converted deployment data set before you save the object in the target object store. The script can modify an object to be imported. The pre-save script can also return an error code, causing the import of this object to fail.

If an object in the data set is not imported because the import operation is set to Update if newer or Never update, then the pre-save script does not run for that object.

Post-save
Runs the scripts on each object after the FileNet Deployment Manager saves the object in the target object store.

If an object in the data set is not imported because the import operation is set to Update if newer or, then the post-save script does not run for that object.

Post-import
Runs the scripts one time after the import operation finishes processing all objects that are contained in the deployment data set. The post-import scripts are passed a FileNet P8 domain interface. If any object fails to import, then the post-import scripts do not run.

For each run type, you add scripts in the order that you want them to run. For more information, see Configuring an import options set file.

The import processor determines the order in which scripts run as follows:

  1. All pre-import scripts that are run in the order they are listed.
  2. All pre-save scripts that are run in order each time the processor prepares to import an object.
  3. All post-save scripts that are run in order each time the processor saves an object.
  4. All post-import scripts that are run in the order they are listed.
Restriction: The pre-save and post-save run types might have a noticeable performance impact because each script in the run-type list is run for each object that is imported.

Script return values

Script return values are evaluated as follows:
  • A return value of Java™ type Double must be greater than zero to be evaluated as true
  • A return value of Java type String must have a value of "true" (not case-sensitive) to be evaluated as true.
  • A return value of Java type Boolean must have a value of true to be evaluated as true.
  • Return values of any other type are evaluated as false.
  • Null return values are evaluated as false.
A return value that is not true effects the import operation as follows, depending on the run-type of the script that returns it:
  • Returned from a pre-import script: The import is stopped.
  • Returned from a pre-save script: The import of the target object is skipped.
  • Returned from a post-save script: No impact.
  • Returned from a post-import script: The import indicates that it completed with errors.

Sample scripts

To help you get started with customizing the import process, FileNet Deployment Manager includes sample JavaScript scripts that demonstrate the basic execution of Content Engine Java API calls. The scripts are provided as templates to be modified to suit your specific needs. For customizing scripts, see Prepare import scripts.



Last updated: March 2016
deploy_ce_importscripts_concepts.htm

© Copyright IBM Corporation 2017.