IBM BPM, V8.0.1, All platforms > Administer the IT infrastructure > Administer Business Process Choreographer

Cleanup procedures for Business Process Choreographer

An overview of the runtime objects that can be deleted from the database after they are no longer needed, and the tools available.


Types of tools available for deleting objects

Depending on which types of objects you want to delete, you will be able to use one or more of the following tools:


Objects that can be deleted and tools to use

The following Business Process Choreographer database objects can be deleted when they are no longer needed.

API-accessible objects

You can write your own cleanup tool that uses the Business Process Choreographer APIs to delete process instances, task instances, and task templates that were created at run time using the APIs. Templates that are part of an enterprise application cannot be deleted using the APIs. For general information about using the APIs, refer to Developing client applications for BPEL processes and tasks.

Process and task templates

Templates can be deleted in the following ways:

Process and task instances

Instances can be deleted from the Business Process Choreographer database in the following ways:

  • If you configure a Business Process Archive Manager and associate it with your Business Process Choreographer configuration, you can run the archive.py script to move completed process instances and human tasks to the archive database, which deletes them from the Business Process Choreographer database. For more information about archiving, refer to BPEL process archiving overview.

  • Using the administrative console to configure the cleanup service to schedule jobs that periodically delete eligible instances. This is described in Configure the cleanup service and cleanup jobs.

  • Run a script to delete completed instances:

  • Set the appropriate properties in the business model, using Integration Designer:

    For business processes:

    The property Automatically delete the BPEL process after completion can have the value Yes, No, or On successful completion. If this property has the value No or On successful completion, it makes sense to configure a cleanup job to delete the process instances.

    For human tasks:

    The property Auto deletion mode can have the value On completion, or On successful completion (which is the default). Deletion will only take place, and you can only change the value for Auto deletion mode, if the property Duration until task is deleted either has the value Immediate or a defined interval.

    If the property Duration until task is deleted has the value Never, automatic deletion is disabled, the Auto deletion mode property cannot be changed, and it makes sense to configure a cleanup job to delete the human tasks. Otherwise, if Duration until task is deleted does not have the value Never, and Auto deletion mode has the value On successful completion, then it makes sense to define a cleanup job to delete the human tasks that do not complete successfully.

  • For applications that were deployed using the Process Center, perform Undeploying process application snapshots.

  • To delete a small number of instances, it can be convenient to use the Business Process Choreographer Explorer, which allows you to check details about the instances before you delete them.

You can use more than one of these techniques for deleting instances. In which case, an instance will be deleted by the first attempt to delete it.

Audit log entries

You can delete audit log entries by running the deleteAuditLog.py script, which is described in Delete audit log entries, using administrative scripts.

Hold queue

Messages that cannot be processed are placed on the hold queue, this includes messages for instances that have been deleted. You can empty the hold queue by replaying the messages in the queue, which will cause any messages for deleted instances to be discarded.

Shared work items

You can delete unused shared work items by running the cleanupUnusedStaffQueryInstances.py script with the -cleanupSharedWorkItems option, which is described in Remove unused people query results, using administrative scripts.

By default, the cleanup daemon for deleting shared work items and unused cached people query results regularly deletes unused shared work items. You can change the schedule on the Human Task Manager configuration and runtime pages in the administrative console. You can also modify the cleanup daemon's behavior using the administrative console to set the following Human Task Manager custom properties:
Human Task Manager custom property Description
SharedWorkItemCleanup.Interval This property uses the WebSphere crontab format to control the schedule. The default value of 0 0 3 * * ? causes the daemon to run every night at three o'clock. To disable the daemon, set the value to the value DURATION_INFINITE. This schedule applies to both the cleanup of shared work items and the cleanup of unused cached people query results.
SharedWorkItemCleanup.Timeout Specifies the maximum number of seconds that the shared work item cleanup can take. If this custom property is not set, the default used is 3600 seconds (one hour).

People queries

You can delete unused people queries by running the cleanupUnusedStaffQueryInstances.py script, which is described in Remove unused people query results, using administrative scripts.

By default, unused cached people query results are deleted by the cleanup daemon for deleting shared work items and unused cached people query results. The schedule is shared with the shared work item cleanup, which you can change on the Human Task Manager configuration and runtime pages in the administrative console or by changing the Human Task Manager custom property SharedWorkItemCleanup.Interval. You can also use the administrative console to change the timeout and slice size by setting the following Human Task Manager custom properties:
Human Task Manager custom property Description
UnusedStaffCleanup.Timeout Specifies the maximum number of seconds that the people query cleanup can take. If this custom property is not set, the default used is 3600 seconds (one hour).
UnusedStaffCleanup.SliceSize The number of unused people query results that are deleted in each transaction. If this custom property is not set, the default value of 500 is used.

If the performance of deleting the unused people queries is too slow, you can optionally improve the performance by adding a new database index on the table STAFF_QUERY_INSTANCE_T for the column IS_SHAREABLE.


Delete data from the Business Process Archive

If you have configured a Business Process Archive Manager, and use the archive.py script to move completed process instances and human tasks from the Business Process Choreographer database (BPEDB) to the Business Process Archive database (BPARCDB), you can use any of the following tools and scripts to delete objects from the archive when they are no longer needed.

You cannot delete process templates or task templates from the archive database. A template is automatically deleted from the archive database when the last instance that references the template is deleted from the database.

The following scripts cannot be run on the archive database:

Administer Business Process Choreographer


Related tasks:
Configure the cleanup service and cleanup jobs
Delete Business Process Choreographer objects
Undeploying BPEL process and human task applications, using the administrative console
Undeploying BPEL process and human task applications, using an administrative command
Querying and replaying failed messages, using the administrative console


Related information:

Options for maintaining an optimal Business Process Choreographer database size
Setup, configuration, and maintenance of the Business Process Choreographer database