This command is run against a server instance to delete
snapshots for process applications or toolkits. For example, you might
want to run the command if an excessive number of snapshots is causing
your system to slow down.
Purpose
Use
the BPMDeleteSnapshot command in connected mode
from Process Server to delete snapshots for process applications or
toolkits. The BPMDeleteSnapshot command cannot
be used from Process Center.
You can only run the command for
one process application or toolkit at a time. In
a network deployment environment, you must run this command on the
node containing the application cluster member that handles Process
Server or Process Center applications. Do not run this command from
the deployment manager profile.
Note: Only a user with Repository
Admin privileges can delete a snapshot.
The following preconditions
must exist for any snapshot that you want to delete:
- The snapshot must exist
- The snapshot must be inactive
- The snapshot must have no running instances
- The snapshot must not be deployed
- On BPM Advanced, any business-level applications that are related
to the snapshot must be uninstalled before you can delete the snapshot.
If one or more of the preconditions have not been met
when the command is run, the command is terminated and an error message
is written to the command-line console and the SystemOut.log file
to indicate which of the preconditions was not met. Generally, the
message contains some suggestions for achieving the preconditions.
For example:
You cannot delete an active snapshot.
To
view the status of a snapshot, use the BPMShowSnapshot command. You
can also view the status of snapshot instances in the Inspector view
of Process Designer.
Generally, you can prepare a snapshot for
deletion by completing the following steps:
- Run the BPMShowProcessApplication command
to determine whether the snapshot exists for the process application.
- Run the BPMShowSnapshot command
to determine the status of the snapshot, such as whether it is the
default snapshot and whether it is active with running instances.
- Run the BPMDeactivate
command to deactivate the snapshot.
- Run the BPMStop
command to stop the snapshot and its running instances.
- Run the BPMUndeploy
command to undeploy the snapshot from the server. This also
uninstalls any business-level applications that are related to the
snapshot.
After you have completed these tasks, you can run the BPMDeleteSnapshot
command.
Note: When you delete a snapshot, any related BPD instances
that have a status of Terminated, Completed,
or Failed will be deleted also.
If you
are using a SOAP connection, this command can take longer to complete
than the default SOAP timeout value, which will result in an exception. This
exception might occur in the following circumstances:
- When you are using the command to remove a snapshot with many
running business process instances. If you plan to remove snapshots
with many business process instances, increase the value of the SOAP.requestTimeout property,
which is set by default to 180 seconds. You can find this property
in the soap.client.props file in the following
path: <your server profile>/properties.
- When you are deleting many snapshots at a time using the command: $AdminTask
BPMDeleteSnapshot {-containerAcronym PA01 -containerSnapshotAcronyms
{Snapshot01 Snapshot02 ...}} Note that in this case Process
Server snapshot deletion is not affected.
If you delete a snapshot on a node that is running IBM
Process Server in an ND environment and you make an initial attempt
to redeploy the snapshot to another node without first restarting
the node, the redeployment might fail and the following message (or
a variation of it) might be logged in the log files:
E
CWLLG2229E: An exception occurred in an EJB call. Error: Could not
get branch from VersioningContext
To resolve
the problem, you can choose any one of the following actions:
- Make a second attempt to redeploy the snapshot to the other node
without restarting the node. This second attempt at redeployment should
be successful.
- Restart any other nodes where you want to redeploy the snapshot
and then redeploy the snapshot to the nodes.
- Redeploy the snapshot to the same node where the BPMDeleteSnapshot admin
task was run.
Parameters
If you do not know the acronym
for a required parameter, use the BPMShowProcessApplication command
to list the details of a process application and its snapshots, including
acronyms.
- -containerAcronym containerAcronym
- A required parameter of type String that identifies the acronym
of the process application or toolkit that contains the snapshots.
For example, the BillingDispute process application might have an
acronym of BILLDISP.
- -containerSnapshotAcronyms containerSnapshotAcronyms
- A required parameter of type String[] that identifies the acronyms
of the snapshots. For example, snapshot 01 and snapshot 02 might have
acronyms of SS2.0.1 and SS2.0.2.
- -force
- A parameter that specifies that you want to delete the default
snapshot of a process application. Default snapshots are not deleted
unless you include the force parameter.
- -outputFile outputFile
- This is an optional parameter that provides a qualified file path
to write the snapshot cleanup log entries. The default log file is systemout.log.
Example
The following examples shows how
to establish a SOAP connection to Process Server and delete those
snapshots for the process application BILLDISP that have snapshots
acronyms of SS2.0.1 and SS2.0.2:
Important: In a network deployment environment, use the port
configured for the application cluster member that runs the Process
Server or Process Center applications. To determine the correct port
number, see the WebSphere administrative console Ports collection
page (click and find the value for
SOAP_CONNECTOR_ADDRESS).
- Jython example
wsadmin -conntype SOAP -port 8880 -host ProcessServer01.mycompany.com -user admin -password admin -lang jython
AdminTask.BPMDeleteSnapshot('[-containerAcronym BILLDISP -containerSnapshotAcronyms [SS2.0.1 SS2.0.2]]')
- Jacl example
wsadmin -conntype SOAP -port 8880 -host ProcessServer01.mycompany.com -user admin -password admin
$AdminTask BPMDeleteSnapshot {-containerAcronym BILLDISP -containerSnapshotAcronyms {SS2.0.1 SS2.0.2}}