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

    Set the value of this parameter to True for initiating the archiving process and storing required documents in the XML files. The default value is false.

  • archive_location

    The location on the client machine where the archived files are downloaded from the server.

  • activity_ids

    The activity ID that must be archived. 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

    The cutoff date for archiving that must be specified 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.

  • startDate

    The start date of the archive process. When specifying from the command line, the date and time must be specified in the yyyy-MM-dd%HH:MM format. The percent is included to avoid the space between the date and the time

  • endDate

    The end date of the archive process. When specifying from the command line, the date and time format must be specified as yyyy-MM-dd%HH:MM. The percent is included to avoid the space between the date and the time.

  • dateType

    The dateType parameter determines the date to select the document from 'alwf_work_item'. The possible values for the parameter:

    • doc_date_created
    • doc_date_modified

    By default, the value is set to doc_date_created. You can set the value of the xmdbtool.nodate application parameter to true if you do not want the dates to be considered when filtering the data to be archived. By default, the value is set to false.

  • purge

    Set the value of this parameter to True for deleting documents from the database. Else, set the value to false.

  • Tenant Id (Optional)

    Specify the tenant id. This parameter applies to the multi-tenant environment only.

  • archive.countryISO

    Specify the archive or purge document that belongs to a user with a country iso.

  • archive.isBatchProcess

    Set the value of this parameter to True to confirm that a process is running in batches.

  • archive.batchNumToProcess

    Specify the batch number. The default value is 1000.

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.