Skip to content

SQL-014: clsXPrintControlCollection.RetrieveSQL

Retrieves XPRINT_CONTROL rows whose PROCESSED_DATE is before a given cutoff or whose CREATE_DATE is more than 30 days old. This query drives the pending-processing and stale-batch-cleanup workflow. The 30-day threshold is set in Criteria.New as ThirtyDaysAgoDate = Today.AddDays(-30). Staleness logic is governed by BR-003.

Classification

Field Value
SQL ID SQL-014
Operation type Read (Retrieve)
Execution method Inline
Database Oracle
Schema [unqualified]**
Command type Text
Business object clsXPrintControlCollection
Criteria property RetrieveSQL
Lifecycle method BeforeRetrieve

Parameters

Parameter Direction Type Max length Description
:ProcessedDate Input Date — Batches processed before this date are eligible
:ThirtyDaysAgoDate Input Date — Today.AddDays(-30) — catches stale unprocessed batches regardless of processed status

Tables

Table Access Columns used
XPRINT_CONTROL SELECT DIRECTORY_NAME, DUPLEX_CODE, IDM_PATH_NAME, MD5_HASH_VALUE, PROCESSED_DATE, XML_FILE_NAME, XPRINT_CONTROL_SEQ_NUM, CREATE_DATE

Sample SQL

Select
    XPRINT_CONTROL.DIRECTORY_NAME           as DirectoryName,
    XPRINT_CONTROL.DUPLEX_CODE              as DuplexCode,
    XPRINT_CONTROL.IDM_PATH_NAME            as IdmPathName,
    XPRINT_CONTROL.MD5_HASH_VALUE           as Md5HashValue,
    XPRINT_CONTROL.PROCESSED_DATE           as ProcessedDate,
    XPRINT_CONTROL.XML_FILE_NAME            as XmlFileName,
    XPRINT_CONTROL.XPRINT_CONTROL_SEQ_NUM   as XprintControlSeqNum
From
    XPRINT_CONTROL
Where
    XPRINT_CONTROL.PROCESSED_DATE < :ProcessedDate
    OR XPRINT_CONTROL.CREATE_DATE < :ThirtyDaysAgoDate

Operations and processes

Business rules

Note: Statements marked with ** could not be confirmed; treat as unknown until verified.

Sources

  • Services\SAIF.Services.Printing.Remote\clsXPrintControlCollection.vb