Parameters

This chapter lists the parameters required to run the Archive and Purge tool.

You must set appropriate values to these parameters on the command line:

Archive Flag
Set the value of this parameter to True for storing the required documents in the XML files. Else, set the value to false.
Purge Flag
Set the value of this parameter to True for deleting documents from the database. Else, set the value to false.
Archive Directory
Specify the name of the directory where the XML documents must be created for expense reports. This scenario is applicable only if the value of the Archive Flag parameter is set to True. For example, C:\archive\2001.
Activity IDs
Specify a dot-separated list of activity IDs for selecting the required expense reports. The IDs correspond to the activity_id column in the alwf_activity table.

For example, you can specify the Activity IDs as 72008.72009 to run the Archive and Purge tool for all the expense reports in the Archive and Destroy activities.

This SQL statement provides a list of the Expense Report Activity IDs and the names to determine the appropriate activities for the Archive and Purge process:

SELECT activity_id, display_name

FROM alwf_activity

WHERE (business_process_id = 101)

Cutoff Date
Specify the cutoff date corresponding to the document creation date in the YYYYMMDD format.

For example, if the cutoff date is 20120101, all documents created before January 1, 2012 are eligible for archiving or purging, along with the Activity IDs.

Use Date Range
Specify whether the start/end date range parameter is used for creating the document. If date range value is set to true, the cutoff date is not used.
Start Date
The date when the document creation started. When specifying from the command line, the date and time must be specified in the yyyy-mm-dd format. The percent is included to avoid the space between the date and the time.
End Date
The date when the document creation was completed. When specifying from the command line, the date and time format must be specified as yyyy-mm-dd. The percent is included to avoid the space between the date and the time
Tenant Id (Optional)
Specify the tenant id. This parameter applies to the multi-tenant environment only.
Note: You must set the application parameter values carefully after reviewing the existing documents in your database.
Example:
run_archive_purge true false c:\archive\2012 72008.72009 20120101 false 0 0
This command only archives the documents that are created before January 1, 2012 and are in the 72008 and 72009 activity.
run_archive_purge true true c:\archive\2012 72008.72009 20120101 true 2012-01-01 2012-12-31
This command archives and purges the documents that are created between January 1, 2012 and December 31, 2021 and are in the 72008 and 72009 activity. Ensure that you take a backup of the transaction database before performing a purge process.