Configuring Cleanup of the PVM_WORK_ITEM or PVM_REQUEST_QUEUE Database Tables
When Process Manager processes/completes a row in the PVM_WORK_ITEM or PVM_REQUEST_QUEUE database tables, it sets that row's STATUS value to 2 (DONE). By default, those rows are immediately and automatically removed from the tables when Process Manager has completed processing them. Therefore, using the default behavior, you will not see rows in the PVM_WORK_ITEM or PVM_REQUEST_QUEUE database tables with a status of 2 (DONE).
However, you can configure the Process Manager so that it does not remove the rows automatically when processing of the row is done. This is done using the following JVM properties:
- com.tibco.pvm.deleteWorkItem - Set this property to "false" to prevent rows in the PVM_WORK_ITEM table from being removed automatically upon completion of a row. Conversely, set the property to "true" (or remove the property) to revert to default behavior.
- com.tibco.pvm.deleteRequestQueueItem - Set this property to "false" to prevent rows in the PVM_REQUEST_QUEUE table from being removed automatically upon completion of a row. Conversely, set the property to "true" (or remove the property) to revert to default behavior.
If you use the properties shown above to prevent automatic removal of completed rows, you can use the JVM properties listed below to configure background cleanup of completed rows:
- com.tibco.bx.bg.workItemCleanup.batchCount - The number of batches to process, in the background, to remove completed rows from the PVM_WORK_ITEM table. The background process stops when this count is reached, or the number of completed rows is less than the batchSize (see below). A value of -1 causes all completed rows to be removed.
Default = -1
- com.tibco.bx.bg.workItemCleanup.batchSize - The number of completed rows to remove from the PVM_WORK_ITEM table in each batch.
Default = 500 (minimum is 250)
- com.tibco.bx.bg.workItemCleanup.interval - The frequency to perform the background cleanup of the PVM_WORK_ITEM table. Specified as either of the following:
Default = P30 (minimum is P15)
- com.tibco.bx.bg.requestQueueCleanup.batchCount - The number of batches to process, in the background, to remove completed rows from the PVM_REQUEST_QUEUE table. The background process stops when this count is reached, or the number of completed rows is less than the batchSize (see below). A value of -1 causes all completed rows to be removed.
Default = -1
- com.tibco.bx.bg.requestQueueCleanup.batchSize - The number of completed rows to remove from the PVM_REQUEST_QUEUE table in each batch.
Default = 1000 (minimum is 500)
- com.tibco.bx.bg.requestQueueCleanup.interval - The frequency to perform the background cleanup of the PVM_REQUEST_QUEUE table. Specified as either of the following:
Default = P30 (minimum is P1)
Note that if you elect to not use the automatic deletion of completed rows, and the number of such rows grows very large, performance may be impacted when the background cleanup job is processing, particularly if you've configured a large batch size.