---
title: SAIF.Services.Printing.Remote operations and processes
summary: Business and technical operations supported by this library.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-07-30
library: SAIF.Services.Printing.Remote
reference_type: package
---

# 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](operations/deferred-print-queue-lifecycle.md) | 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](business-rules.md#br-001-row-count-contention-check), [BR-002](business-rules.md#br-002-deferred-print-retentioneligibility-rule) | [XDEFERRED_PRINT](database-tables.md#xdeferred_print) | [SQL-004](sql/SQL-004-saif-services-printing-remote.md), [SQL-010](sql/SQL-010-saif-services-printing-remote.md), [SQL-015](sql/SQL-015-saif-services-printing-remote.md), [SQL-019](sql/SQL-019-saif-services-printing-remote.md) |
| [Print-control batch header lifecycle](operations/print-control-batch-header-lifecycle.md) | 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](business-rules.md#br-001-row-count-contention-check), [BR-004](business-rules.md#br-004-duplex-mode-controlled-vocabulary), [BR-006](business-rules.md#br-006-idm-path-default) | [XPRINT_CONTROL](database-tables.md#xprint_control) | [SQL-007](sql/SQL-007-saif-services-printing-remote.md), [SQL-013](sql/SQL-013-saif-services-printing-remote.md), [SQL-017](sql/SQL-017-saif-services-printing-remote.md), [SQL-022](sql/SQL-022-saif-services-printing-remote.md) |
| [Create a print batch with documents](operations/create-print-batch-with-documents.md) | 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](business-rules.md#br-001-row-count-contention-check), [BR-005](business-rules.md#br-005-default-bin-type-on-document-creation) | [XPRINT_CONTROL](database-tables.md#xprint_control), [XDOCUMENT](database-tables.md#xdocument) | [SQL-007](sql/SQL-007-saif-services-printing-remote.md), [SQL-006](sql/SQL-006-saif-services-printing-remote.md) |
| [Retrieve print-control batches pending processing](operations/retrieve-print-control-batches-pending-processing.md) | Load unprocessed or stale batch headers for cleanup | Batch/cleanup job supplies a processed-date cutoff | Processed-date cutoff | Collection of `clsXPrintControl` | [BR-003](business-rules.md#br-003-print-control-batch-staleness-rule) | [XPRINT_CONTROL](database-tables.md#xprint_control) | [SQL-014](sql/SQL-014-saif-services-printing-remote.md) |
| [Retrieve documents for printing](operations/retrieve-documents-for-printing.md) | 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](database-tables.md#xdocument), [XPRINTER_BIN](database-tables.md#xprinter_bin), [XPRINTER](database-tables.md#xprinter) | [SQL-011](sql/SQL-011-saif-services-printing-remote.md), [SQL-012](sql/SQL-012-saif-services-printing-remote.md) |
| [Delete documents for a batch](operations/delete-documents-for-a-batch.md) | 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](business-rules.md#br-001-row-count-contention-check) | [XDOCUMENT](database-tables.md#xdocument) | [SQL-021](sql/SQL-021-saif-services-printing-remote.md) |

## Process flow diagram
The following diagram visualizes the primary operational flow across operations.

```mermaid
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](operations/deferred-print-queue-lifecycle.md) | [SQL-004](sql/SQL-004-saif-services-printing-remote.md), [SQL-010](sql/SQL-010-saif-services-printing-remote.md), [SQL-015](sql/SQL-015-saif-services-printing-remote.md), [SQL-019](sql/SQL-019-saif-services-printing-remote.md) | [XDEFERRED_PRINT](database-tables.md#xdeferred_print) | Read/Write |
| [Print-control batch header lifecycle](operations/print-control-batch-header-lifecycle.md) | [SQL-007](sql/SQL-007-saif-services-printing-remote.md), [SQL-013](sql/SQL-013-saif-services-printing-remote.md), [SQL-017](sql/SQL-017-saif-services-printing-remote.md), [SQL-022](sql/SQL-022-saif-services-printing-remote.md) | [XPRINT_CONTROL](database-tables.md#xprint_control) | Read/Write |
| [Create a print batch with documents](operations/create-print-batch-with-documents.md) | [SQL-007](sql/SQL-007-saif-services-printing-remote.md), [SQL-006](sql/SQL-006-saif-services-printing-remote.md) | [XPRINT_CONTROL](database-tables.md#xprint_control), [XDOCUMENT](database-tables.md#xdocument) | Write |
| [Retrieve print-control batches pending processing](operations/retrieve-print-control-batches-pending-processing.md) | [SQL-014](sql/SQL-014-saif-services-printing-remote.md) | [XPRINT_CONTROL](database-tables.md#xprint_control) | Read |
| [Retrieve documents for printing](operations/retrieve-documents-for-printing.md) | [SQL-011](sql/SQL-011-saif-services-printing-remote.md), [SQL-012](sql/SQL-012-saif-services-printing-remote.md) | [XDOCUMENT](database-tables.md#xdocument), [XPRINTER_BIN](database-tables.md#xprinter_bin), [XPRINTER](database-tables.md#xprinter) | Read |
| [Delete documents for a batch](operations/delete-documents-for-a-batch.md) | [SQL-021](sql/SQL-021-saif-services-printing-remote.md) | [XDOCUMENT](database-tables.md#xdocument) | Delete |

## Failure and edge-case behavior
- All `After*` lifecycle methods across all six business objects check `RowsAffected <> 1` and add an error message on contention — see [BR-001](business-rules.md#br-001-row-count-contention-check) — except `clsXDeferredPrint.AfterDelete`, whose check is commented out in source (see [Deferred print queue lifecycle](operations/deferred-print-queue-lifecycle.md)).
- `clsXDocumentCollection.DeleteSQL` (SQL-021) has no `BeforeDelete` override in this library; its request construction depends on unverifiable base-class default wiring (see [Delete documents for a batch](operations/delete-documents-for-a-batch.md)).**
- `clsXPrintControl.DuplexMode`'s getter has no `Return` for unrecognized duplex codes, yielding an implicit default enum value (see [Print-control batch header lifecycle](operations/print-control-batch-header-lifecycle.md)).**
- Several collection-level `Criteria` SQL properties are dead code (commented-out `Before*` methods or unwired properties): [SQL-001](sql/SQL-001-saif-services-printing-remote.md), [SQL-002](sql/SQL-002-saif-services-printing-remote.md), [SQL-003](sql/SQL-003-saif-services-printing-remote.md), [SQL-005](sql/SQL-005-saif-services-printing-remote.md), [SQL-008](sql/SQL-008-saif-services-printing-remote.md), [SQL-009](sql/SQL-009-saif-services-printing-remote.md), [SQL-016](sql/SQL-016-saif-services-printing-remote.md), [SQL-018](sql/SQL-018-saif-services-printing-remote.md), [SQL-020](sql/SQL-020-saif-services-printing-remote.md).

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

## Related documentation
- [Index](index.md)
- [Overview](overview.md)
- [Architecture](architecture.md)
- [Dependencies](dependencies.md)
- [Business rules](business-rules.md)
- [Database tables](database-tables.md)
- [SQL catalog](sql/index.md)
- [API reference](api/index.md)

## Sources
- `Services\SAIF.Services.Printing.Remote\clsXDeferredPrint.vb`
- `Services\SAIF.Services.Printing.Remote\clsXDeferredPrintCollection.vb`
- `Services\SAIF.Services.Printing.Remote\clsXDocument.vb`
- `Services\SAIF.Services.Printing.Remote\clsXDocumentCollection.vb`
- `Services\SAIF.Services.Printing.Remote\clsXPrintControl.vb`
- `Services\SAIF.Services.Printing.Remote\clsXPrintControlCollection.vb`
