Migrating instances

When you are installing snapshots on a process server, consider how to handle the business process definition instances that are running on the server.

To migrate instances, you must be a system administrator or a person with authorization to deploy new snapshots.

When a snapshot of a process application is installed on a server, instances of that process that use that snapshot are likely to be started. An instance is an active process. For an order process, each order results in a new instance. The instance runs until the process completes or fails. When you install a new snapshot, you must decide how to handle the data from the previous snapshot and the instances that are still running from that previous snapshot. IBM® Business Process Manager offers two ways to migrate process instances:
  • While the snapshot is being installed, select Migrate.
  • Use the Migrate Inflight Data option after a snapshot is installed.
This topic describes the option of selecting Migrate while the snapshot is being installed.

Install snapshots of process applications from IBM Process Center. When you install a snapshot on a connected process server, the installation process checks to find out whether the target server is currently running instances of the business process definitions that are included in the snapshot. If the installation process detects running instances on the target server, you are asked whether you want to migrate those running instances to the new snapshot. You must also consider how you want to handle tokens that might be orphaned if the activities that they were attached to are not part of the new snapshot.

Consult the following table to understand the migration options.

Migration options Description
Leave The instances that are currently running continue to completion using the previously installed snapshot.
Migrate The instances that are currently running are migrated to the new snapshot that you are installing. Wherever the running instances are in the flow of the process, the new version is implemented for the next item or step. Use this option if you want to manipulate the data or use a policy file to manage orphaned tokens. See Managing orphaned tokens.
Delete The instances that are currently running are immediately stopped and do not continue to completion. All records of the running instances are removed from the process server. The delete option does not delete BPEL process instances, human task instances, or business state machine instances.
Note: This option is not available for process servers in production environments.

If you migrate instances or delete instances from a snapshot, the snapshot is deactivated. If you leave running instances, the original snapshot is not deactivated when the new snapshot is installed.

The migration process

Important: Before you begin to migrate instances, read the advice in Strategies for migrating instances. It contains important information about the migration implementation. For example, you cannot migrate instances that are running inside a toolkit.

Test your migration. Verify the results of instance migration in a test environment before you install the new snapshot on a production server. It is a risky oversight to test a new version by creating new instances, but to fail to test for migrated instances.

When you select Migrate, the following actions occur automatically:

  1. The snapshot that originally contained the running instances is deactivated.
  2. The replacement snapshot is installed on the server.
  3. The migration program runs the installation service.
  4. The migration program migrates global data (exposed process variables, environment variables, teams). It uses the most recent time stamp on each exposed process variable to identify the global data to use in the replacement snapshot.
  5. The instance is migrated:
    1. The execution context is updated.
    2. The actions are updated.
  6. The migration program moves the "default" designation from the snapshot of the running instances to the newly installed snapshot. This action takes place only if the snapshot of the running instances was previously designated as the default snapshot.
  7. Instances from the source snapshot are deactivated.
  8. The updated snapshot is activated.

If, in spite of your preparation, your snapshot instance fails to install on the server, see Troubleshooting errors and failures in a failed process instance for suggestions about how to proceed.

This topic applies only to the IBM Business Process Manager Advanced configuration.

Migrating BPEL instances

When you deploy a new version of a BPEL process, you might want the latest process version to apply to both new process instances and to process instances that have already started. To migrate running BPEL process instances to a new version of the process, you can use an administrative script to migrate process instances in bulk or use Business Process Choreographer Explorer to migrate specific instances.

Important: When you install snapshots with BPEL content on a connected process server, the Migrate or Delete options apply to the business process definition instances but not to your running BPEL process instances.