You can install snapshots onto a connected IBM® Process
Server by using wsadmin commands in a set of
scripts. If one or more snapshots are already installed, any process instances that are currently
running continue to use their original snapshot until they complete.
About this task
You can script the installation of snapshots onto a connected server instead of using the
Process Center console. By using a set of scripts
that contain wsadmin commands, you can automate the installation steps. When you install a snapshot,
you also install the toolkit snapshots that it depends on unless these toolkit snapshots already
exist on the Process Server.
Procedure
To script the installation of a snapshot onto a connected
server, include the following wsadmin commands in the scripts:
- Install the snapshot by running the BPMInstall command in the
profile_root/bin directory. For
example:
AdminTask.BPMInstall('[-containerAcronym HSS -containerSnapshotAcronym SHSV856 -containerTrackAcronym Main -serverName ProcessServer01 -skipGovernance false]')
For information about the command, see BPMInstall command.If the process application is already installed, any running
instances are given the Leave migration option. For information, see Migrating instances.
- Optional: If you are installing a snapshot
and you need a migration policy to migrate active instances, extract
the migration policy file for that snapshot using the BPMExtractMigrationPolicy command. For example:
AdminTask.BPMExtractMigrationPolicy('[-containerAcronym HSS -containerSourceSnapshotAcronym V1 -containerTargetSnapshotAcronym SHSV856 -outputFile C:\ftp_source\V1_to_SHSV856.xml]')
The creator of the snapshot should create the migration policy
by analyzing the difference between the source and target snapshots.
The snapshot creator can use the migration policy editor to edit the
content of the migration policy file. For information, see Defining the migration policy.
- On the Process Server, to migrate running
instances to the new snapshot, run the BPMMigrateInstances command in the
profile_root/bin directory. In the command, identify an old snapshot as the source and the new snapshot as the target. If
you exported a migration policy file for the source snapshot, add the path to that file as the
orphanTokenPolicyFile parameter. For information about the command, see BPMMigrateInstances command.
Tip: You can also delete all orphaned tokens in
Process Inspector. However, with Process Inspector, you cannot choose to delete individual orphaned
tokens or move any tokens.
For example:
AdminTask.BPMMigrateInstances(’[-containerAcronym HSS -sourceContainerSnapshotAcronym V1 -targetContainerSnapshotAcronym V2 C:\logFiles\V1_to_SHSV856.xml]')
- Optional: If necessary, set
environment variables. For example, the correct value
for a particular environment (such as test or production) might not
be known during the process design. In those cases, you must provide
the value after installing the process application in the new environment. For information, see BPMSetEnvironmentVariable command or Configuring runtime environment variables.
- Optional: If necessary, establish
runtime teams. For example, after you install a snapshot
in a new environment (such as test or production), you might need
to add or remove users in the teams for that process application.
That is, users in the test environment might not have been available
in the development environment. For information, see Configuring runtime teams.
- Optional: If necessary,
control exposed processes and services. For example,
after you install a snapshot in a new environment (such as test or
production), you might need to disable a particular exposed process
or service within that process application For information,
see Configuring exposed processes and services.
Results
The snapshot that you installed becomes the default snapshot
and it is automatically active.