How does the Purge process work?

How does the Purge process work?

The STAC Purge Job automatically removes eligible files and images from cases marked with an event. It ensures compliance with record-retention requirements while maintaining safe configuration controls.

Processing Summary

Item

Description

Job Schedule

Runs nightly

Processing Basis

Image/file level (not case level)

File Selection

Oldest → newest, by dt_Created (not “Image Date”)

Daily Limit

Up to 20,000 files per run (maximum threshold — the job processes all qualifying files, up to that limit)

Action

Permanently deletes qualifying files

Continuation

Remaining eligible files are automatically deleted in subsequent nightly runs


Counting Logic

  • Each image, document, or standalone file counts as one purge action.
  • Linked folders are counted as one file, regardless of how many documents or subfiles they contain.
  • Because of this, the total number of “records marked for purge” (e.g., 2,400 files) may not match the actual number of files processed.
  • The 20,000 per run figure represents a hard-coded maximum not a guaranteed count per cycle.
    • If fewer than 20,000 files meet purge criteria, the system will delete only that smaller number.
    • If more than 20,000 qualify, the remaining files will be processed automatically in the next nightly run.
  • The purge process continues until all eligible files are deleted.

Configuration Safeguards

To prevent misconfiguration, the purge job validates parameters before execution.
If any setting violates minimum requirements, the system halts the purge and notifies the administrator.

 

Validation

Threshold

Notification Message

Minimum File Age

Must be ≥ 350 days

“The current setting is configured to purge images created less than 350 days. Please update this setting in the Image Option setting. Purge will not run until this is corrected.”

Minimum Disposition Age

Must be ≥ 350 days

“The current setting is configured to purge images on cases disposed less than 350 days. Please update this setting in the Image Option setting. Purge will not run until this is corrected.”

No Image Types Configured

N/A

“There are no Image Type records configured to be automatically purged by the system.”

Invalid Case Type Settings

Below Image Option threshold

“There are case types configured with the minimum age of disposition below the limit set in the Image Option.”


Processing Logic

  1. Identify Eligible Cases
    • Finds cases containing your designated purge event (e.g., “Approved to Destroy”).
  2. Validate Configuration
    • Confirms that Image Options and Case Type rules meet required thresholds.
  3. Select Files
    • Sorts by dt_Created, from oldest to newest.
  4. Purge
    • Deletes up to 20,000 qualifying files per run.
    • If fewer than 20,000 qualify, only that number is deleted.
    • If more than 20,000 qualify, the rest are handled in the next nightly cycle.
  5. Repeat Automatically
    • Remaining eligible files are automatically picked up and processed on subsequent runs.

 


Best Practices

  • Verify Image Options and Case Type thresholds are ≥ 350 days.
  • Ensure appropriate Image Types are configured for purge.
  • Monitor Admin Notifications for configuration warnings.
  • If other jobs (custom or local scripts) manage purge behavior, confirm they don’t conflict with the native STAC purge job.
    • Related Articles

    • What is the Automatic File Purge?

      What is the Automatic File Purge? The Automatic file Purge is a feature that automatically deletes files from the Image Module once a case has been disposed of for some time. There are a few configurations to indicate which Case Types can have their ...
    • Frequently Asked Questions

      Bookmarks What tabs are able to be bookmarked? Users are able to bookmark items from: Event Tab Image Tab Note Tab Relationship tab Image Review Screen CIP Cloud Storage Can users use the OCR or PDF indexing on images that are in CIP Storage? If ...
    • How to configure the Document Maintenance?

      Introduction Merging documents is without a question one of the most powerful functions in the system. Agencies can design and create their own documents pulling data from STAC. There are variables available to retrieve dates, names, charges, ...
    • How to configure the Summary Tab?

      Summary tab The concept of the Summary tab is to provide a place where the STAC Administrator can display data from multiple areas of STAC in a single place. The Summary tab allows the creation of multiple pages, allowing for different users to see ...
    • How to setup E-file?

      How to setup STAC to E-file documents? There are several required fields to e-file a document with the FACC. The admin should have the following areas configured: E-file type code table Document configured in the Document Maintenance Image Sub-type ...