SAIF.Services.Printing.Remote operations and processes¶
This page is the operation catalog and cross-operation hub for this library. Each operation's detailed, step-by-step logic lives in its own page under operations/.
Operation catalog¶
| Operation | Intent | Trigger | Inputs | Outputs | Rules | Tables | SQL |
|---|---|---|---|---|---|---|---|
| Deferred print queue lifecycle | Enqueue, retrieve, update, and purge deferred print items awaiting later batch processing | Caller enqueues, updates, or purges an item; a batch job retrieves eligible items | Copies, file name, document description, duplex code, sort values, XML payload, printed-date cutoff or description | Inserted/updated/removed XDEFERRED_PRINT row; collection of clsXDeferredPrint |
BR-001, BR-002 | XDEFERRED_PRINT | SQL-004, SQL-010, SQL-015, SQL-019 |
| Print-control batch header lifecycle | Create, retrieve, update, and delete a print-control batch header | Caller creates, retrieves, updates, or deletes a header by sequence number | Directory name, duplex mode, processed date, IDM path, XML file name, MD5 hash | Inserted/updated/removed XPRINT_CONTROL row; populated clsXPrintControl |
BR-001, BR-004, BR-006 | XPRINT_CONTROL | SQL-007, SQL-013, SQL-017, SQL-022 |
| Create a print batch with documents | Build a new print-control header and its documents in memory, then persist the header followed by every document | Caller starts a new document collection, adds documents, and saves | XPrintControlSeqNum, directory name, XML file name, duplex mode, MD5 hash; per document: file name, type code, email/fax, sort values, print group text |
Inserted XPRINT_CONTROL row and one XDOCUMENT row per document |
BR-001, BR-005 | XPRINT_CONTROL, XDOCUMENT | SQL-007, SQL-006 |
| Retrieve print-control batches pending processing | Load unprocessed or stale batch headers for cleanup | Batch/cleanup job supplies a processed-date cutoff | Processed-date cutoff | Collection of clsXPrintControl |
BR-003 | XPRINT_CONTROL | SQL-014 |
| Retrieve documents for printing | Load a batch's documents with printer/bin routing, per document or grouped for a single print job | A print job supplies XPrintControlSeqNum, PrinterID, and a PrintType |
XPrintControlSeqNum, PrinterID, PrintType |
Collection of clsXDocument with resolved bin number and printer network name |
— | XDOCUMENT, XPRINTER_BIN, XPRINTER | SQL-011, SQL-012 |
| Delete documents for a batch | Remove all documents belonging to a print-control batch | Caller triggers delete on a document collection after the batch has printed | XPrintControlSeqNum |
Rows removed from XDOCUMENT |
BR-001 | XDOCUMENT | SQL-021 |
Process flow diagram¶
The following diagram visualizes the primary operational flow across operations.
flowchart TD
Start([Start]) --> A[Create a print batch with documents]
A --> B[Retrieve print-control batches<br>pending processing]
B --> C[Retrieve documents for printing<br>ByDocSeq or ByPrintGroup]
C --> D{Print complete?}
D -->|Yes| E[Delete documents for a batch]
D -->|No - deferred| F[Deferred print queue lifecycle:<br>enqueue]
F --> G[Deferred print queue lifecycle:<br>retrieve for processing]
G --> H[Deferred print queue lifecycle:<br>purge]
E --> End([End])
H --> End
I[Print-control batch header lifecycle:<br>retrieve/update/delete a header directly] -.-> B
Database interactions¶
The following table summarizes which operations read from or write to the database. Per-step SQL and table citations live in each operation's detail page under operations/.
| Operation | SQL | Tables | Type |
|---|---|---|---|
| Deferred print queue lifecycle | SQL-004, SQL-010, SQL-015, SQL-019 | XDEFERRED_PRINT | Read/Write |
| Print-control batch header lifecycle | SQL-007, SQL-013, SQL-017, SQL-022 | XPRINT_CONTROL | Read/Write |
| Create a print batch with documents | SQL-007, SQL-006 | XPRINT_CONTROL, XDOCUMENT | Write |
| Retrieve print-control batches pending processing | SQL-014 | XPRINT_CONTROL | Read |
| Retrieve documents for printing | SQL-011, SQL-012 | XDOCUMENT, XPRINTER_BIN, XPRINTER | Read |
| Delete documents for a batch | SQL-021 | XDOCUMENT | Delete |
Failure and edge-case behavior¶
- All
After*lifecycle methods across all six business objects checkRowsAffected <> 1and add an error message on contention — see BR-001 — exceptclsXDeferredPrint.AfterDelete, whose check is commented out in source (see Deferred print queue lifecycle). clsXDocumentCollection.DeleteSQL(SQL-021) has noBeforeDeleteoverride in this library; its request construction depends on unverifiable base-class default wiring (see Delete documents for a batch).**clsXPrintControl.DuplexMode's getter has noReturnfor unrecognized duplex codes, yielding an implicit default enum value (see Print-control batch header lifecycle).**- Several collection-level
CriteriaSQL properties are dead code (commented-outBefore*methods or unwired properties): SQL-001, SQL-002, SQL-003, SQL-005, SQL-008, SQL-009, SQL-016, SQL-018, SQL-020.
Note: Statements marked with
**could not be confirmed; treat as unknown until verified.
Related documentation¶
Sources¶
Services\SAIF.Services.Printing.Remote\clsXDeferredPrint.vbServices\SAIF.Services.Printing.Remote\clsXDeferredPrintCollection.vbServices\SAIF.Services.Printing.Remote\clsXDocument.vbServices\SAIF.Services.Printing.Remote\clsXDocumentCollection.vbServices\SAIF.Services.Printing.Remote\clsXPrintControl.vbServices\SAIF.Services.Printing.Remote\clsXPrintControlCollection.vb