BPMMigrateInstances command
Use the BPMMigrateInstances command
to run an instance migration.
This command migrates process instances with a status of active, failed, or suspended. Each
process instance is migrated in its own transaction. This command is equivalent to clicking
Migrate Inflight Data in the Process Admin Console. If you have a policy file
that you want to apply during instance migration, use the
-orphanTokenPolicyFile parameter.
To review the migration status of the
instances after running the command, check the following locations:
- SystemOut.log and other server log files.
- If the process application is exposed to the Process Admin Console, check the Installed Apps page in the Process Application Console.
The BPMMigrateInstances command is run using the AdminTask object of the wsadmin scripting client.
Prerequisites
The following conditions must be met:
- In a network deployment environment, an application cluster member runs the Workflow Server and IBM® Workflow Center applications. Therefore, you must run this command on the node that contains that application cluster member. Do not run the command from the deployment manager profile.
- Run the command in the connected mode; that is,
do not use the wsadmin
-conntype noneoption. - To access the wsadmin command, the ID being
used must have the WebSphere® Application
Server administrator
role. See Administrative roles
for information about
roles.
Location
Start the wsadmin scripting client from the install_root/bin directory.
Syntax
BPMMigrateInstances
-containerAcronym process_application_acronym
-sourceContainerSnapshotName snapshot_name | -sourceContainerSnapshotAcronym snapshot_acronym
-targetContainerSnapshotName snapshot_name | -targetContainerSnapshotAcronym snapshot_acronym
[-orphanTokenPolicyFile file_path]
[-useNetworkAvailablePolicyFile true | false]Parameters
- -containerAcronym process_application_acronym
- A required parameter that identifies the process application that
is to be migrated. For example, the BillingDispute process application
might have an acronym of BILLDISP.Tip: If you do not know the acronym for a required parameter, use the BPMShowProcessApplication command to list the details of a process application, including acronyms.
- -sourceContainerSnapshotName snapshot_name
- This parameter provides the snapshot name from which instances will be migrated (the old version). You must specify either this parameter or -sourceContainerSnapshotAcronym.
- -sourceContainerSnapshotAcronym snapshot_acronym
- This parameter identifies the snapshot from which instances will be migrated (the old version). You must specify either this parameter or -sourceContainerSnapshotName.
- -targetContainerSnapshotName snapshot_name
- This parameter provides the snapshot name to which instances will be migrated (the new version). You must specify either this parameter or -targetContainerSnapshotAcronym.
- -targetContainerSnapshotAcronym snapshot_acronym
- This parameter identifies the snapshot name to which instances will be migrated (the new version). You must specify either this parameter or -targetContainerSnapshotName.
- -orphanTokenPolicyFile file_path
- This optional parameter identifies a policy file to use during instance migration. This file is distributed to all the nodes in the same network deployment environment and then instance migration is performed on those nodes.
- -useNetworkAvailablePolicyFile true | false
- This optional parameter must be set to
trueif the policy file is larger than 100 KB. Save the file in a path accessible to all nodes.
Example
The following example illustrates how to establish a SOAP connection to the Workflow Center server and then migrate process instances.
Important: In a network deployment environment, use the port
configured for the application cluster member that runs the Workflow Server or Workflow Center applications.
To determine the correct port number, see the administrative console
Ports collection page (click and find the value for SOAP_CONNECTOR_ADDRESS).
wsadmin -conntype SOAP -port 8880 -host ProcessCenterServer01.mycompany.com -user admin ID -password administrator password -lang jython wsadmin>AdminTask.BPMMigrateInstances(’[-containerAcronym HSS -sourceContainerSnapshotName "V1" -targetContainerSnapshotName "V2"]’)
The following example uses -sourceContainerSnapshotAcronym and -targetContainerSnapshotAcronym.
wsadmin -conntype SOAP -port 8880 -host ProcessCenterServer01.mycompany.com -user admin ID -password administrator password -lang jython wsadmin>AdminTask.BPMMigrateInstances(’[-containerAcronym HSS -sourceContainerSnapshotAcronym "V1" -targetContainerSnapshotAcronym "V2"]’)
The following example uses -sourceContainerSnapshotName and -targetContainerSnapshotAcronym.
wsadmin -conntype SOAP -port 8880 -host ProcessCenterServer01.mycompany.com -user admin ID -password administrator password -lang jython wsadmin>AdminTask.BPMMigrateInstances(’[-containerAcronym HSS -sourceContainerSnapshotName "V1" -targetContainerSnapshotAcronym "V2"]’)
The following example uses the orphanTokenPolicyFile parameter.
wsadmin -conntype SOAP -port 8880 -host ProcessCenterServer01.mycompany.com -user admin ID -password administrator password -lang jython wsadmin>AdminTask.BPMMigrateInstances(’[-containerAcronym HSS -sourceContainerSnapshotAcronym "V1" -targetContainerSnapshotAcronym "V2" -orphanTokenPolicyFile C:\\policyFiles\optFile.xml]’)</p>)
The following example uses the orphanTokenPolicyFile and -useNetworkAvailablePolicyFile parameters.
wsadmin -conntype SOAP -port 8880 -host ProcessCenterServer01.mycompany.com -user admin ID -password administrator password -lang jython wsadmin>AdminTask.BPMMigrateInstances(’[-containerAcronym HSS -sourceContainerSnapshotAcronym "V1" -targetContainerSnapshotAcronym "V2" -orphanTokenPolicyFile C:\\policyFiles\optFile.xml -useNetworkAvailablePolicyFile true]’)