Multiple Records Purge

You can delete a set of records based on criteria specified by the user. This feature works with the Batch mode or the Bulk mode. In both cases, the size of the batch or bulk per execution is configurable. The optimal default value is 1000.

You can configure the batch size for the purge by adding the property com.tibco.cim.database.delete.batch.size in the "Optimization Switches" category in the ConfigValues.xml file.

For both modes the batch size must be set. The handling of batch execution differs depending on the mode selected.

The product keys of the records to be deleted are fetched from the database by running database queries. You build the queries, execute, and export the product key IDs to an external file, such as a .csv file. The .csv file should have a single column of product IDs. The column must have a column name at the top followed by the record key IDs. The file name is provided with a path relative to the user's home. For example, C:\Users\<user_name> on a Windows platform.

The queries can be very specific to your needs, but the following are some simple examples:
  • Purge all records of an employee who resigned
    SELECT ID FROM PRODUCTKEY PK, MCT_35522 MC WHERE PK.ID = MC.CPRODUCTKEYID AND MC.EMPID = '7654321';
  • Purge all product records (from product repository)
    SELECT ID FROM PRODUCTKEY PK WHERE PK.CATALOGID = 35522;

The utility is implemented with the record mode (-o record) to specify the relative path to the input file with product key IDs to delete.

The batch update exception handling is specific to the database in use. If you are using an Oracle database and if the batch update fails, the execution returns with an update exception with update counts. If you are using a PostgreSQL database and if auto commit is set to true, the rows executed before the exception are committed.

If the record is in workflow, the record is purged, and the work item remains. If it is submitted, it closes but the record does not get processed.