This page captures the operational rules enforced by the printing, distribution, and report workflow code in SAIF.Services.Printing.
BR-001: Distribution mode follows the Asynchronous flag¶
Field
Value
Statement
Document distribution uses either a direct xPression SOAP call or an MSMQ-backed asynchronous queue path based on clsPrint.Asynchronous.
Trigger
A caller invokes clsPrint.distributeDocument or ReportBase.Distribute.
Enforcement
clsPrint.distributeDocument() branches on If m_Async Then ... Else ... before choosing the queue or SOAP path.
Outcome
The same report payload can be distributed immediately or queued for later processing without changing the caller-facing method signature.
Confidence
Verified
Source
Services\SAIF.Services.Printing\clsPrint.vb
BR-002: Asynchronous distribution must commit or abort an MSMQ transaction¶
Field
Value
Statement
The asynchronous distribution path commits a transactional MSMQ send on success and aborts the transaction on failure.
Trigger
clsPrint.distributeDocument() runs with Asynchronous = True.
Enforcement
StartMQTransaction, m_Queue.Send, and EndMQTransaction(True/False) coordinate transactional message delivery inside clsPrint.distributeDocument().
Outcome
Queue-based print requests do not leave an active transaction open after success or exception handling.
Confidence
Verified
Source
Services\SAIF.Services.Printing\clsPrint.vb
BR-003: Report rendering selects the default printer by execution platform¶
Field
Value
Statement
ReportBase.Render resolves the default printer from clsSecurityPrincipal using the Web platform when _environmentService.IsWeb is true, and Windows otherwise.
Trigger
A caller invokes ReportBase.Render.
Enforcement
ReportBase.Render sets the platform enum, creates clsSecurityPrincipal, and assigns xPrint.Printer = x.GetDefaultPrinter().
Outcome
Render operations use a platform-appropriate default printer before the preview request is submitted.
The method body contains Throw New NotImplementedException.
Outcome
Consumers must use the xPression-based clsPrint path for distribution scenarios.
Confidence
Verified
Source
Services\SAIF.Services.Printing\clsRSPrint.vb
BR-007: Package name normalization strips a trailing .pkg extension¶
Field
Value
Statement
clsPrint.Package strips a trailing .pkg extension (case-insensitive) from any value assigned to it before the name is used in preview, print, or distribution requests.
Trigger
A caller sets clsPrint.Package directly, or indirectly through previewPDF, previewDocument, or distributeDocument, each of which assigns the incoming package name to the Package property.
Enforcement
The Package property setter checks Right(Value, 4).ToLower = ".pkg" and, when true, stores Left(Value, Value.Length - 4) instead of the raw value.
Outcome
xPression preview, print, and distribution calls always receive a package name without a .pkg suffix regardless of whether the caller supplied one.