Business Process Server comes along with the cleanup scripts for both bpel and bpmn. These scripts can be executed within a predefined time interval. By doing so, database lookup time can be reduced significantly.
Clean up scripts can be located in BPS_HOME/repository/samples/resources/cleanup-scripts.
BPS pack provides cleanup scripts for the following databases.
Warning: Do not execute the cleanup script when the server is running. Server should be shutdown before executing the cleanup scripts.
BPEL cleanup scripts
BPEL cleanup scripts are used to clean up the both completed bpel instances and human tasks. Scripts can be found under the BPS_HOME/repository/samples/resources/cleanup-scripts/bpel folder.
BPMN cleanup scripts
BPMN cleanup scripts are used to clean up the completed bpmn instances. Scripts can be found under the BPS_HOME/repository/samples/resources/cleanup-scripts/bpmn folder