The [Ensemble] > [Purge Management Data]
page allows you to delete outdated entries from the Event Log, message warehouse, business process log, business rule log, and I/O archive log. You can only purge entries associated with the active namespace. To navigate to this page, click Ensemble
, and then click Go
This chapter contains the following topics:
The activity of purging generates extra journaling, especially if you purge a large volume of data, and this journaling can consume a large amount of disk space. For performance reasons, you might adopt the following approach when you first purge management data:
Start by setting the purge parameters so that a relatively small amount of data is purged.
As discussed in the next section you use the option Do not purge most recent
to specify how many days’ worth of records to keep. Set this to a relatively large number.
Typically you purge data manually during development and testing. (In contrast, for a live system, you typically purge data on a periodic basis, as described in the next section
To purge data manually, use the [Ensemble] > [Purge Management Data]
page. This page displays the following information:
Total number of entries of this type stored for this production. Use the Count
to decide whether or not it is worthwhile to purge the records and if so, how many days’ worth of records you want to keep.
Total number of entries of this type that the purge process deleted after you click
and the purge completes.
Beneath the table is a box to enter your purge criteria and the command to perform the purge.
Include message bodies
If selected, this check box indicates that when Ensemble purges message headers, it should also purge the associated message bodies. Ensemble verifies that body classes exist and are persistent, before purging them.
If this check box is clear (the default), message header data is purged, but message body data is retained. If you purge message headers but retain the message bodies, then the Management Portal provides no way to purge the orphaned message bodies. In this case, you must purge the message bodies programmatically. In the ENSDEMO
database, the class Demo.Util.CleanupSet
provides an example of how you might do this.
When Ensemble purges a message body, it does not necessarily delete object-valued properties of the message body. Specifically, it deletes other objects only if these are serial objects or are child objects (as defined by a relationship). For other objects, you must appropriately handle the deletion by defining a delete trigger or implementing the %OnDelete()
method in the message body class.
Keep data integrity
If selected (the default) this check box indicates that when Ensemble purges message headers, even if a message meets the age criterion for purging, it is not deleted unless its status is complete
. Ensemble considers messages to be complete
if they are marked Complete, Error, Aborted, or Discarded. This is to keep session-level integrity.
The query that identifies the messages to delete checks all the messages (including business process instances) in a session to see whether any of them are not complete. The purge only performs the delete if all the messages are complete. The scope of this query, therefore, has an impact on the time taken to do the purge.
This option is important to support long-running business processes. Usually this is the desired behavior. However, if you know there are old messages in the system whose incomplete status is not significant, you can purge them by clearing the Keep data integrity
Do not purge most recent
This tells Ensemble how many days’ worth of records to keep. The number can be 0 (zero), which keeps nothing and deletes all entries that exist at the time of the purge operation. The default value for Do not purge most recent
is 7, which keeps entries for the last seven days.
The count of days includes today
, so keeping messages for 1 day keeps the messages generated on the current day, according to local server time.
At the bottom of the Purge Criteria
box is the
command. If you click it, Ensemble immediately purges the persistent store according to the parameters you have entered. The page uses a background job to do purges, and reports the results of the last-run purge, including a status code, or a notice if the background job is running or has failed to run. When the purge completes, the Deleted
column contains the number of records purged for each type. If a purge is currently executing in the namespace, the
command is inactive.
You cannot undo the
Purging Data Periodically
For a live system, you typically purge data on a periodic basis. To do so
When you select this class, the page updates to display configurable information for this task.
Specify the following options:
Complete the wizard as described in the previously referenced section.