Business Process Choreographer data migration script for shared work items
If you migrated from version 7.0.0.2
or earlier, you can optionally activate support for shared work items,
which should improve performance. You must use the migrateWI.py script
to migrate data and activate the support.
This topic only
describes this migration script. For details about activating shared
work items, see Adding support
for shared work items.
Location
This script is in the Business Process Choreographer subdirectory for administration scripts:

install_root/ProcessChoreographer/admin/migrateWI.py
install_root\ProcessChoreographer\admin\migrateWI.pyRestrictions
- Run the script in disconnected mode to avoid connection timeout problems.
- When you use the
-setModeoption, the cluster that hosts the Business Process Choreographer configuration must be stopped. - You must run the database migration script on the node of a cluster member, and not on the deployment manager.
- Depending on the quantity of data and the power of your database server, the migration process can take several hours.
Command syntax
Run the script
by starting wsadmin with the following parameters:
-conntype NONE
[-profileName profile]
[-tracefile trace_file]
-f migrateWI.py
(-migrateToWISharing | -setMode WS_SHARING_ACTIVE_MODE | -getMode)
[-duration duration]
[-slice slice_size]
-cluster clusterName
[[-dbUser userID] -dbPassword password]
[-dbSchema schema]Because wsadmin overwrites
its trace file, use the -tracefile option to specify
a file name and location for the trace file for the work item data
migration.
Parameters
- -clusterclusterName
- Specifies the Business Process Choreographer configuration, for which the work items in the database will be migrated to shared work items.
- -dbPasswordpassword
- The password is required.
- -dbSchemaschema
- This parameter is not required if you have configured an explicit
schema. Use this parameter if you need to override the configured
schema qualifier. If no -dbSchema is provided,
the schema name from the data source is used, and if no explicit schema
is configured for the data source, the implicit (default) schema is
used:
- For DB2® the implicit schema is the user ID used to connect to the database, so if you specify the -dbUser parameter, and you are using an implicit schema based on a different user ID, then you must specify the -dbSchema parameter to prevent the wrong user ID being used as the implicit schema.
- For Microsoft SQL
Server, the implicit schema is
dbo
.
- -dbUseruserID
- The optional user ID to authenticate with the database. If no -dbUser is
provided, the default used is the user ID of the authentication data
alias that is associated with the
jdbc/BPEDBdata source. This authentication data alias normally has the following name:BPM_DB_ALIAS. If the default user ID does not have sufficient permissions, you must use this option to specify a user ID that does have the necessary permissions. - -durationminutes
- When using the -migrateToWISharing option,
you can optionally use the -duration parameter
to specify the maximum duration, in minutes, that the script will
run for. The default is
1. The maximum possible value is34560, which is equivalent to 24 days. - -getMode
- This option displays the current state of operation of the shared
work item migration. It returns one of the following values.
WS_INITIAL_MODE- Indicates that the schema for the Business Process Choreographer
database has not been upgraded for shared work items. After running
the upgradeSchemaSharedWIs.sql script, the mode
changes to
WS_MIGRATION_MODE. WS_MIGRATION_MODE- In this mode, the database schema has been updated, and existing
work items must be migrated to shared work items by running the migrateWI.py script
with the -migrateToWISharing option. Finally,
when nearly all work items have been migrated, running the migrateWI.py script
with the -setMode WS_SHARING_ACTIVE_MODE option
migrates any remaining work items and switches the mode to
WS_SHARING_ACTIVE_MODE. WS_SHARING_ACTIVE_MODE- In this mode, the shared work item optimization is active.
- -migrateToWISharing
- The -migrateToWISharing option causes the script to create shared work items for non-shared work items. The script should be run using this option, more than once if necessary, until all or nearly all work items have been created as shared work items. Only then, should you switch the system to using shared work items by running this script again, but using the -setMode WS_SHARING_ACTIVE_MODE option. The options -migrateToWISharing and -setMode are mutually exclusive. When you use the -migrateToWISharing option, you can also specify any of the optional parameters -duration and -slice.
- -profileNameprofileName
- This specifies the name of the migration target profile where you run the migrateWI.py script. It is either the profile of a single server, or of a cluster member, but never the deployment manager. The parameter is optional, but if you have more than one profile in the migration target Workflow Server installation it is best to supply the parameter to be sure that the script runs in the context of the correct profile, which ensures, for example, that the correct data source is used.
- -setMode WS_SHARING_ACTIVE_MODE
- The -setMode WS_SHARING_ACTIVE_MODE option causes the script to switch the system to using shared work items. You must stop the server or cluster that hosts the Business Process Choreographer configuration before you run the script with this option. The options -migrateToWISharing and -setMode are mutually exclusive.
- -sliceslice
- When using the -migrateToWISharing option,
you can optionally use the -slice parameter to
specify the transaction size, which can be between
10and50000. The default value is 50. Optimum values depend on many factors including the size of the database objects, and the size of the transaction log. In general, smaller values make the script run slower.
This topic only applies to BAW, and is located in the BAW repository. Last updated on 2025-01-20 10:38