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

BPMProcessInstancesCleanup command

Use this command to delete business process definition (BPD) instance data for a process application snapshot on IBM Process Server.

Purpose

Use this command deletes the BPD instance and its associated tasks for the instances that are specified by the command parameters. It also logs data to a standard systemout.log file to track which process applications were selected for deleting instance data.

To run this command, you must be in the tw_admins group. Also, you can run this command only in the connected mode. In a network deployment environment, you must run this command on the node containing the application cluster member that handles Process Server applications. Do not run this command from the deployment manager profile.

Restriction: The following restrictions apply:

Parameters

-containerAcronym containerAcronym

A required parameter that identifies the acronym that specifies the process application to perform process instance cleanup against.

For example, the BillingDispute process application might have an acronym of BILLDISP.

-containerSnapshotAcronym containerSnapshotAcronym

A required parameter that identifies the snapshot acronym for the process application. The snapshot acronym can be different from the snapshot name. To find the snapshot acronym, run the BPMShowProcessApplication command. Refer to the topic in the related link.

-instanceStatus instanceStatus

A required parameter that identifies the status of process instances to clean up.

  • COMPLETED - Removes all completed process instances

  • FAILED - Removes all failed process instances

  • CANCELED - Removes all terminated process instances

  • ALL - Removes all completed, failed, and canceled process instances

You cannot delete an instance that is currently running.

-instanceID instanceID

An optional parameter of type String[] that identifies the number of instance IDs that are being removed. If there is more than one instance ID, each instance ID must be delimited by a space for Jython format commands or a semicolon for JACL format commands.

You can also use this parameter with endedAfterLocal or endedBeforeLocal. See the examples in this topic.

-endedAfterLocal endedAfterLocal

An optional parameter of type String that identifies the local time on the server. The string must have the following format:yyyy-MM-ddThh:mm:ss (year, month, day, T, hours, minutes, seconds). Only instances that completed, failed, or canceled after the specified time period by this parameter are processed. If you use this parameter with the endedBeforeLocal parameter, only instances that completed, failed, or canceled during the specified time period by this parameter are processed.

-endedBeforeLocal endedBeforeLocal

An optional parameter of type String that identifies the local time on the server. The string must have the following format: yyyy-MM-ddThh:mm:ss (year, month, day, T, hours, minutes, seconds). Only instances that completed, failed, or canceled after the specified time period are processed. If you use this parameter with the endedAfterLocal parameter, only instances that completed, failed, or canceled during the specified time period by this parameter are processed.

-outputFileoutputFile

An optional parameter that provides a qualified file path to write the process instance cleanup log entries. The default is systemout.log.

Examples

The following examples show how to use the BPMProcessInstancesCleanup command.

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)

Related information:
BPMShowProcessApplication command