BPMDeactivate command

This command deactivates an active snapshot.

The deactivation function prevents any new requests but allows all existing instances and in-flight requests to complete processing. Using the optional parameters, you can also deactivate the default snapshot as well as suspend in-flight instances.

It is possible to deactivate the default snapshot without using the optional -force parameter. It is, therefore, recommended to check whether the snapshot is set as the default before deactivating it. When there is only one snapshot for a process application, deactivating the default snapshot might be intended, but when there is more than one, it is recommended that you mark another snapshot as the default before deactivating the current default snapshot.

You might need to deactivate a snapshot if you want to undeploy it from a Process Center server, or if you want to stop it or undeploy it from a Process Server.

Using this command does not stop a BPEL process. Unless you are running the server in development mode or you are running the process application on a Process Center server, you might need to perform additional actions for process applications that include BPEL processes:
  • If your process application uses a BPEL process as the main entry component, you must stop the corresponding BPEL template in the WebSphere administrative console. See "Administering BPEL process and task templates."
  • Additionally, if this BPEL process invokes a BPD, you must allow any existing instances to complete after you stop the template but before you deactivate the snapshot. See "Administering BPEL process and task templates."
  • In all cases, you must clean up the associated process instance data from the Business Process Choreographer database, as described in "Cleanup procedures for Business Process Choreographer."

The BPMDeactivate command is run using the AdminTask object of the wsadmin scripting client.

Prerequisites

Important: In an environment with multiple security domains configured, use the PALService MBean instead of this wsadmin command. See The Process Application LifeCycle (PAL) MBean.
The following conditions must be met:
  • 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.
  • Run the command in the connected mode; that is, do not use the wsadmin -conntype none option.
  • To access the wsadmin command, the ID being used must have a WebSphere® Application Server role with more privileges than the monitor role. See Administrative roles for information about roles.
  • To access the IBM® BPM API used by this command, the ID being used must belong to either the bpmAdminGroup or bpmAuthorGroup. The default name for the bpmAdminGroup is tw_admins and the default name for the bpmAuthorGroup is tw_authors. See IBM Business Process Manager default group types for information about groups.
    Tip: By default, only the DeAdmin user has both the WebSphere Application Server administrator role and membership in the bpmAdminGroup.
Note: If you are using a SOAP connection, the command can take longer to complete than the specified SOAP timeout value. Although the command continues to run until it is finished, you might see the exception java.net.SocketTimeoutException: Read timed out. To prevent this exception, set a higher value for the com.ibm.SOAP.requestTimeout property in the profile_root/properties/soap.client.props file.

Location

Start the wsadmin scripting client from the profile_root/bin directory.

You can check the status of the command in the server SystemOut.log file.

Syntax

BPMDeactivate 
-containerAcronym process_application_or_toolkit_acronym
-containerSnapshotAcronym snapshot_acronym
-containerTrackAcronym track_acronym
[-force]
[-suspendAllBPDInstances]
[-outputFile file_path]

Parameters

-containerAcronym String
A required parameter that identifies the process application (Process Server and Process Center) or toolkit acronym (Process Center only). For example, the BillingDispute process application might have an acronym of BILLDISP.
-containerTrackAcronym String
An optional parameter that identifies the track associated with the process application or toolkit. The default value is Main.
-containerSnapshotAcronym String
A required parameter that identifies the process application (Process Server and Process Center) or toolkit snapshot acronym (Process Center only).
Tip: You can find the process application acronym on the snapshot page in Process Center or by using the BPMShowProcessApplication command.
-force
An optional parameter that deactivates the default snapshot of the process application or toolkit.
-suspendAllBPDInstances
An optional parameter that suspends all instances associated with the given context instead of letting them continue to run. The instances remain suspended until you resume them.
Restriction: This parameter is not supported when Tip is used as the value for the -containerSnapshotAcronym parameter.
-outputFile file_path
An optional parameter that specifies the file path to write the log messages that result from running the command. The path to the file can be absolute or relative but the directory structure must already exist. If you do not provide this parameter, the message are written to the SystemOut.log file.

Example

In the following example, you first establish a SOAP connection to the Process Center server and then deactivate a snapshot of the BillingDispute process application. The snapshot is part of the Main track.

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 Servers > Server Types > WebSphere application servers > server_name > Communications > Ports and find the value for SOAP_CONNECTOR_ADDRESS).
wsadmin -conntype SOAP -port 8880 -host ProcessCenterServer01.mycompany.com -user admin -password admin -lang jython
wsadmin>AdminTask.BPMDeactivate('[-containerAcronym BILLDISP -containerSnapshotAcronym SS2.0.1 -containerTrackAcronym Main]')