IBM Business Process Manager, V8.0.1, All platforms > Reference > Commands and scripts > Commands (wsadmin scripting)

BPMDeleteSnapshot command

This command is run against a server instance to delete process application snapshots and their dependencies. For example, you may 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 and their dependencies for a specific process application. The BPMDeleteSnapshot command cannot be used from Process Center.

You can only run the command for one process application 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.

Only a user with Repository Admin privileges can delete a snapshot.

The following preconditions must exist for any snapshot that you want to delete:

If one or more of the preconditions has 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:

After you have completed these tasks, you can run the BPMDeleteSnapshot command.

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 occurs 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.

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 may fail and the following message (or a variation of it) may 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:

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 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 process application snapshots. For example, snapshot 01 and snapshot 02 might have acronyms of SS2.0.1 and SS2.0.2.

-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:

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 Servers > Server Types > WebSphere application servers > server_name > Communications > Ports and find the value for SOAP_CONNECTOR_ADDRESS).

Parent topic: Commands (wsadmin scripting)