Database Cleanup

When a business process completes normally or in error, all the information associated with that process (events, keys, timers) in the runtime database is no longer available to the runtime engine. Statistical information about the business processes is stored in the database and the database can be queried using Server Instance Management Monitoring or clagent. If the statistical information is not removed, the runtime data store continues to grow. Eventually, engine performance is affected and the database runs out of space.

The cleanup process deletes obsolete information from the runtime database so that it does not affect regular engine performance. Cleanup removes all information associated with a normally completed process from the runtime database based on a user-configurable interval. It removes information for processes that complete in an error state based on a different user configurable interval. If the information was immediately removed, the user would have no chance to see the process state when it ends in error.

Cleanup uses the configured instance information to make sure it is only deleting information associated with the one runtime engine. The following runtime instance properties are used to determine when to perform the database cleanup.

Cleanup properties

The following runtime instance configuration properties apply to database cleanup.

Property

Description

Cleanup Period - Retain Completed

Number of hours before removing business processes and events that successfully completed. Default is 24 hours.

Cleanup Period - Retain Error

Number of hours before freeing memory and disk space of business process information that is completed in an error state. Default is 24 hours.

Cleanup Threads

Specification of whether to run cleanup or not (0=no cleanup or 1=perform cleanup).

Cleanup Interval

Specifies the time interval in minutes between invocations of the cleanup operation to remove expired business processes. The value must be greater than 16; the default is 60. If a value less than 16 is entered, the default of 60 is used by the engine.

 

Example

Cleanup processes based on the Cleanup configuration properties for the runtime instance.

With the following settings, Cleanup runs every 180 minutes, removing business process information older than 6 hours for completed processes and older than 24 hours for errored processes.

Cleanup Period - Retain Completed = 6

Cleanup Period - Retain Error = 24

Cleanup Threads = 1

Cleanup Interval = 180

Note: Configuring the Cleanup properties also requires setting the Cleanup Threads to 1, which starts cleanup automatically when the engine starts and terminates when the engine shuts down.