IBM BPM, V8.0.1, All platforms > Installing, deploying, and undeploying applications in the runtime environment > Installing process application snapshots
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.
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 install a new snapshot, you need to decide how to handle the data from the previous snapshot and the instances that are still running from that previous snapshot. IBM BPM 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 install a snapshot on a connected process server, the installation process checks to find out if 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. Use this option if you want to manipulate the data or use a policy file to manage orphaned tokens. See Manage orphaned tokens. 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. 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. 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.
If you migrate currently running instances to a new version of the snapshot, problems can occur if the new version removes steps or other components from the business process definition. When running instances have tokens on business process definition or service-level components that have been removed in the new snapshot, migration can fail. Tokens indicate where a runtime instance is currently running. Tokens can be present on an activity, a conditional sequence line, a coach, a service call, and numerous other elements. For more information about orphaned tokens and advice about how to move or delete them, see Manage orphaned tokens. For suggestions about how to proceed if your snapshot instance fails to install, see Troubleshooting errors and failures in a failed process instance.
The migration process
When you select Migrate, the following steps occur during the migration process:
- Deactivate the source snapshot.
- Install the snapshot on the server.
- Run the installation service.
- Migrate global data (exposed process variables, environment variables, participant groups). The migration process uses the most recent timestamp on each exposed process variable to identify the global data to use in the replacement snapshot. See the related topic about data migration rules.
- Migrate the instance:
- Update the execution context.
- Update actions.
- Deactivate instances from the source snapshot.
- Activate the updated snapshot.
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 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.
- Data migration rules
If running instances of the business process definitions that you are installing are discovered on the target process server, the target server migrates data according to the migration option you choose.
- Migrating BPEL processes
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 either an administrative script to migrate process instances in bulk or Business Process Choreographer Explorer to migrate specific instances.
Installing process application snapshots
Related concepts:
Data migration rules
Manage orphaned tokens
Related tasks:
Manage the lifecycle of BPEL processes using Business Process Choreographer Explorer
Delete BPEL process instances using Business Process Choreographer Explorer
Create a new version of your BPEL process - migrate running instances