Adding scripts to the import process
When developing a production application, you should use a test environment
to create, test, and modify your system before you deploy it in a production
environment. Although Enterprise Manager's import facility effectively transfers
Content Engine objects from one system to another, it does not customize those
objects for the new environment.
To customize the import process for your production environment, you can associate
VBScript or JScript files with the XML import file. These scripts can modify
the imported objects or the data associated with those objects.
This feature is available for both manual and automatic imports:
- For manual imports, use the Import
Helper's Scripts tab.
- For automatic imports, use the Auto-Import
Scripts tab, available through the Enterprise
Manager's Root Properties sheet.
The methods used for applying scripts to your import process depend on the
type of data and objects you want to modify.
Object and data types
You can use scripts to modify the properties and values that depend on each
imported object's development environment. You can program a script to:
- Modify the data specific to the forest, domain, server, or Active Directory
where the objects reside. For example, you can add a script that sets the
user, group, and security assigned to an object.
- Customize the Content Engine objects for the new environment. For example,
you can change the security assigned to specific objects or modify a property
within an object.
- Update workflow subscriptions with values that correspond to the workflow
definitions and released version in the new environment.
- Replace references to the object store ID stored in the object's properties.
For example, you can add a script that updates the ID associated with an imported
stored search so it matches the one assigned to the new object store.
Script run types
You can run each script at various points during the import process using one
of the following run types:
- Pre-import: runs the script once prior to importing any objects included
in the selected XML file. This enables the script to modify the XML objects
or take other actions not related to the XML objects.
- Pre-save: runs the script on each object included in the XML file, prior
to saving the object on the target object store, enabling the script to modify
object properties that become frozen after saving the object in the new object
store.
- Post-save: runs the script on each object after the program saves the object
on the target object store, enabling the script to modify object properties
that are unavailable before saving the object in the new object store.
- Post-import: runs the script once after importing all objects into the target
object store.
The import processor determines the order in which scripts run as follows:
- All pre-import scripts run in the order they appear in the Import Helper
script list.
- All pre-save scripts run in order each time the processor imports an object.
- All post-save scripts run in order each time the processor saves an object.
- All post-import scripts run in the order they appear in the Import Helper
script list.