Try OpenEdge Now
skip to main content
Server Administrator's Guide
Using the Archiver : Data handlers : Data purging handler : ProcessDataPurger
 
ProcessDataPurger
It is recommended to use the ProcessDataPurger handler in combination with ProcessDataIdExtractor, which extracts only ids of qualified process instances. The purging operation is carried in three different ways depending upon the data extracted by the Data Extractor handler.
*Purging process instance data with events
*Purging process instance data only
*Purging events only
When event purging is enabled, it is checked if the events are already processed by other components like BPM Process Store, BPM Events and EventPublisher (whichever components are active and are configured in Archiver configuration file).
Default XML configuration files used for event data purging and process instance data purging are provided below for reference. These are the default configuration files used by the archiving schedulers for purging.

Purging of event data

In this example, the process instance Ids are extracted and events for those process instances are purged.
<?xml version="1.0" encoding="UTF-8" ?>
<ArchiverConfig>
    <!--
        Please make sure correct values are provided for the below
        options. If BP servers (EventPublisher or BPM Events) are running,
        then change the value for the attribute 'running' accordingly.
    -->
    <BMServers>
        <EventPublisher running="false"/>
        <BPM Events running="false"/>
    </BMServers>
    <!-- The mentioned handlers are executed in the specified order -->
    <DataHandlers>
        <DataExtractor order="1" maxRows="10000" dbStore="BMDatabaseStore">
            com.savvion.bm.archiver.handlers.ProcessDataIdExtractor
        </DataExtractor>
        <DataPurger order="2" maxRows="50" dbStore="BMDatabaseStore">
            com.savvion.bm.archiver.handlers.ProcessDataPurger
        </DataPurger>
    </DataHandlers>
    <!-- Direct DBStore used to point to BP Server database -->
    <DBStore name="BMDatabaseStore" type="Direct" useBMStore="true">
    </DBStore>
</ArchiverConfig>
The above xml is used for extracting and purging for events. Please note the following points about the xml contents.
*The extraction is done by ProcessDataIdExtractor, which extracts maximum 10000 records of Process Instance Ids, defined by the maxRows attribute.
*The extracted data is purged in batches of size 50 (that is, events belonging to 50 Process Instances). This is set again by maxRows attribute.
*Both the handlers use the DBStore BMDatabaseStore to connect to the database. This is a default datasource created for connecting to Business Process Server database. The DBStore BMDatabaseStore uses direct connection to connect to the database.

Purging of process data

In this example, the process instance Ids are extracted and data for those process instances are purged.
<?xml version="1.0" encoding="UTF-8" ?>
<ArchiverConfig>
    <!--
        Please make sure correct values are provided for the below
        options. If BP servers (EventPublisher or BPM Events) are running,
        then change the value for the attribute 'running' accordingly.
    -->
    <BMServers>
        <EventPublisher running="false"/>
        <BPM Events running="false"/>
    </BMServers>
    <!-- The mentioned handlers are in the specified order -->
    <DataHandlers>
        <DataExtractor order="1" maxRows="10000" dbStore="BMDatabaseStore">
            com.savvion.bm.archiver.handlers.ProcessDataIdExtractor
        </DataExtractor>
        <DataPurger order="2" maxRows="10" dbStore="BMDatabaseStore">
            com.savvion.bm.archiver.handlers.ProcessDataPurger
        </DataPurger>
    </DataHandlers>
    <!-- Direct DBStore used to point to BP Server database -->
    <DBStore name="BMDatabaseStore" type="Direct" useBMStore="true">
    </DBStore>
</ArchiverConfig>
The above xml is used for extracting and purging for events. Please note the following points about the xml contents.
*The extraction is done by ProcessDataIdExtractor, which extracts maximum 10000 records.
*The extracted data is purged in batches of size 10.
*Both the handlers use the DBStore BMDatabaseStore to connect to the database. This is a default datasource created for connecting to Business Process Server database. The DBStore BMDatabaseStore uses direct connection to connect to the database.