Enabling a Purge Trigger

If you do not want to keep previous versions of a document, which could take up a large amount of disk space, you can enable a purge trigger that runs when an updated file is checked in.

The system deletes the previous version of the file on checkin, in effect implementing a replace-on-checkin feature.

  1. Open the Run MQL window:
    1. From the compass, select Collaboration and Approvals.
    2. In the navigation pane, click Utilities > Run MQL.
    To run an MQL command, enter the command in the MQL Command box and click Run or press Enter.
  2. To set the context for the MQL session, run this command:

    set context user creator;

  3. To create an eService Trigger Program Parameters object with a revision of Purge, run this command:

    add businessobject "eService Trigger Program Parameters" "TypeDOCUMENTSCheckInAction" "Purge"
         vault "eService Administration"
         "eService Program Name" emxCommonDocument
         "eService Method Name" purgePreviousVersions
         "eService Sequence Number" <SEQUENCE>
         "eService Program Argument 1" ${OBJECTID}
         "eService Program Argument 2" ${FILENAME_ORIGINAL} 

    If you do not want to purge all types of documents, replace DOCUMENTS with the specific object type, which must be a derived from DOCUMENTS.

    <SEQUENCE> is used to order the program executions when more than one trigger is found.

  4. To add the trigger to the Documents type, run this command:

    modify type <TYPENAME> add trigger checkin action eTriggerManager <TRIGGERNAME>;

    Where <TYPENAME> is the document type, and <TRIGGERNAME> is the name of the eService Trigger Program Parameters object created above.

    For example:

    modify type type_Documents add trigger checkin action eTriggerManager TypeDOCUMENTSCheckInAction;

  5. To activate the trigger, run this command:

    modify businessobject "eService Trigger Program Parameters" "TypeDOCUMENTSCheckInAction" "Purge"
         current Active;