IBM BPM, V8.0.1, All platforms > Troubleshooting and support > Recovering from a failure > Recovery troubleshooting tips

Business Process Choreographer maintenance and recovery scripts

There are several maintenance-related scripts for Business Process Choreographer. Run these maintenance scripts as part of a general maintenance policy to help maintain database performance, or as part of a recovery process as deemed necessary.

You should run these scripts to remove from the database the templates and their associated objects, as well as completed process instances, that are not contained in any corresponding valid application in the configuration repository.

There is also the possibility of having invalid process templates. This situation can occur if an application installation was canceled or not stored in the configuration repository by the user.

IBM BPM also provides a service that automates Business Process Choreographer cleanup.

You can run that service from the administrative console.

Use the following scripts for Business Process Choreographer recovery maintenance:

deleteInvalidProcessTemplate.py

Run this script to delete, from the Business Process Choreographer database, business process templates that are no longer valid. You cannot use this script to remove templates of valid applications from the database. This condition is checked and a ConfigurationError exception is thrown if the corresponding application is valid.

These templates usually have no impact. They are not shown in Business Process Choreographer Explorer.

deleteInvalidTaskTemplate.py

Run this script to delete, from the Business Process Choreographer database, human task templates that are no longer valid. You cannot use this script to remove templates of valid applications from the database. This condition is checked and a ConfigurationError exception is thrown if the corresponding application is valid.

deleteCompletedProcessInstances.py

Run this script when all completed process instances have to be deleted. A top-level process instance is considered completed when it is in one of the following end states:

  • Finished
  • Terminated
  • End
  • Failed

You can specify the criteria to selectively delete top-level process instances and all their associated data (such as activity instances, child process instances, and inline task instances) from the database.

When running these scripts from the command line, make sure that the SOAP client timeout is longer than the duration of the requested operation. For more information about this timeout, see "Connection timeout when running a wsadmin script".


Delete an allotment of completed process instances

You can delete an allotment of process instances from the development environment.

Using a script that wrappers the provided deleteCompletedProcessInstances.py

For example, after altering the script and running the command as:

wsadmin.<bat|sh> -user<USERNAME> -password<PASSWORD> -f loopDeleteProcessInstances.py
2008-04-02T21:00:00 3600
This command will run deleteCompletedProcessInstances.py while increasing the completed before time stamp by one hour (60 minutes * 60 seconds) after every execution.

The deleteCompletedProcessInstances.py script has a time stamp parameter which can be used to control the number of instances being deleted. The smaller the interval, the fewer instances will be deleted per invocation of the deleteCompletedProcessInstances.py. This can be useful in situations where deletion of multiple process instances encounter transaction timeouts. The most common cause for transaction timeouts during process deletion involve the following:

Recovery troubleshooting tips


Related information:
BPEL process instances
Use scripts to administer Business Process Choreographer
Delete process templates that are unused
Delete completed process instances
Delete human task templates that are unused
Configure the cleanup service and cleanup jobs
Connection timeout when running a wsadmin script