Deleting BPD process instances

You can use the Process Admin Console, a REST API call, or a wsadmin command to delete BPD process instances that match specified criteria. You can only perform this operation if your user ID is a member of the administrator group.
Remember: If you want to specify particular process instance states, the states running, finished, and stopped correspond to the states active, completed, and failed in wsadmin and Process Inspector.

Using the Process Admin Console

  1. Click Server Admin > IBM BPM Admin > Health Management.
  2. Select the command Delete Processes.
  3. Specify values for the command's parameters. Required parameters are marked with a '*'.
    Important: To be able to delete process instances that are in states other than finished and terminated, you must specify the option force=true.
  4. Click Submit.
  5. If there is an error, the error message is displayed. Otherwise you get confirmation that the command was submitted and a link that you can click to count how many instances that match the deletion criteria are still in the database. You can refresh the count to check the progress of the deletion.

Using a REST API call

Call the BPM operations REST API DELETE https://host:port/ops/std/bpm/processes.

Remember: For IBM® BPM on Cloud, the operations REST APIs have the following URL, https://hostname.bpm.ibmcloud.com/bpm/environment/ops/std/bpm/processes, where environment has the value dev for the development system, test for the test system, or run for the production (runtime) system.
The following examples illustrate how to use the API.
  • To delete all process instances that are in the states finished or terminated:
    DELETE https://host:port/ops/std/bpm/processes?states=finished,terminated
  • To delete all process instances that are in the states finished or terminated that ended before 2016-07-16T19:20:30-06:00:
    DELETE https://host:port/ops/std/bpm/processes?states=finished,terminated
           &ended_before=2016-07-16T19:20:30-06:00
    Remember: If you need to specify a time zone that is ahead of UTC, you must encode the + symbol as %2B. For example, for the Central European Time zone +01:00, you must use %2B01:00 in your URL. Alternatively, you can specify a UTC date, for example ended_after=2016-01-01T01:00:00Z.
  • To delete all process instances of snapshots V2 and V3 of the process application that has the acronym XYZ and are in the state stopped:
    DELETE https://host:port/ops/std/bpm/processes?container=XYZ
           &versions=V2,V3&states=stopped&force=true
    Important: To be able to delete process instances that are in states other than finished and terminated, you must specify the option force=true.
If the delete operation requires a long time, you can call the count API to check how many instances are remaining to be deleted.
Important: All calls to the IBM BPM operations REST API require that the HTTP header BPMCSRFToken is set with every request. For information about how to obtain a token, see Preventing cross site request forgery.
Tip: For more details about the BPM operations REST APIs and to try invoking them from a browser, use the Swagger interface. The Swagger interface is available at the URL https://server:port/ops/explorer Where server is the host name of your BPM server and port is the port number that is used by the BPM server. For example, https://localhost:9443/ops/explorer

Using a wsadmin command

To delete BPD process instances from the BPM database, see BPMProcessInstancesPurge command.