SAIF.Services.Printing architecture¶
SAIF.Services.Printing is an infrastructure/service-gateway class library that wraps the xPression document
composition SOAP service (xpresso.clsGenerate) and the SQL Server Reporting Services ReportExecution2005
SOAP service, adds an asynchronous MSMQ distribution channel that carries an OnBase imaging index payload, and
provides a small Reporting framework (IReport / ReportBase / XDesignXDocument / XDesignXElement) for
building xPression-format XML documents and driving them through preview, print, distribute, and save flows. It
sits below the application/presentation layers and performs no database access, persistence, or business-object
logic of its own.
Responsibilities¶
- Resolve xPression and SSRS endpoint URLs, MSMQ queue paths, and the imaging drop path through the SAIF
Environment API (
EnvironmentServiceBase), never fromConfigurationManager.AppSettings. - Provide
clsPrintas the protocol/transport gateway for xPression: request assembly, synchronous-versus-queued dispatch (Asynchronous), and MSMQ transaction lifecycle (StartMQTransaction/EndMQTransaction). - Provide
clsRSPrintas the protocol gateway for SSRS: report path, parameters, format/extension mapping, and rendering. - Provide the
Reportingframework (IReport/ReportBase) to orchestrate a report lifecycle (Create→Render→Print/Distribute/Save) and to accumulate non-throwingErrorDetailentries. - Serialize xPression-aware
XDocument/XElementsubclasses (XDesignXDocument,XDesignXElement) into the xPression XML dialect, including key propagation for nested repeating sections (BR-PRT-016).
Component boundaries¶
clsPrint: xPression protocol/transport concern — endpoint resolution, request assembly, sync-vs-queued dispatch, and MSMQ transaction handling. Depends onSAIF.Services.Imaging.Import.clsImageImportas the imaging index payload type carried onImportInfoandCompositeRequestClass.Importinfo.clsRSPrint: SSRS protocol concern — report path, parameters, format/extension mapping, render. Its injecting constructor isPrivate, so it is reachable only through the ambientAppGlobal.EnvironmentService, unlikeclsPrint's public injecting constructor.*Reporting.*(IReport,ReportBase,XDesignXDocument,XDesignXElement,ErrorDetail): content concern — builds the xPression data document, serializes it to the xPression dialect, and drives the report lifecycle.ReportBaseisMustInherit; no concrete subclass exists in this repository's built projects (the only sample, in the excluded test project, is not part of the solution).*- Generated proxy namespaces
SAIF.Services.Printing.xpressoandSAIF.Services.Printing.SharepointReporting: SOAP client boundary to the external xPression and SSRS services respectively; not hand-written.
Interaction model¶
- Callers in the presentation/application layer (
LegalMaintenance/frmPrintPreview.aspx.vb,SAIF.Business.View.Policy/clsPayrollClassInfoCollection.vb) constructclsPrint,clsRSPrint, or aReportBasesubclass and invoke preview/print/distribute/save operations directly; there is no mediating business-object or persistence layer inside this library. clsPrint.distributeDocumentfans out to either a transactional MSMQ send (CompositeRequestClassserialized withBinaryMessageFormatter) or a direct synchronous SOAP call to xPression, selected by theAsynchronousflag (BR-PRT-003).ReportBase.Renderresolves the caller's default printer throughclsSecurityPrincipal, selecting the Web or Windows platform based onEnvironmentServiceBase.IsWeb(BR-PRT-009), then delegates rendering to the report'sclsPrintinstance — created with the parameterless constructor, so the environment service the report itself received is not propagated to it.*- Both
clsPrintandclsRSPrintexpose a parameterless constructor that reaches the ambient staticAppGlobal.EnvironmentService, coupling instance creation to process-wide state rather than pure dependency injection.*
Architecture diagram¶
The following diagram shows the high-level component interactions between the presentation layer, this library's protocol gateways and reporting framework, and the external document/report services.
flowchart TD
Caller["Presentation/business callers<br>(frmPrintPreview, clsPayrollClassInfoCollection)"] --> ReportBase["ReportBase / IReport<br>(report lifecycle)"]
Caller --> ClsPrint["clsPrint<br>(xPression gateway)"]
ReportBase --> XDesign["XDesignXDocument / XDesignXElement<br>(xPression XML builder)"]
ReportBase --> ClsPrint
ClsPrint --> ImageImport["SAIF.Services.Imaging.Import<br>clsImageImport"]
ClsPrint --> MSMQ["MSMQ transactional queue<br>(documentMSMQPath)"]
ClsPrint --> Xpresso["xPression clsGenerate<br>(SOAP)"]
ClsRSPrint["clsRSPrint<br>(SSRS gateway)"] --> SSRS["ReportExecution2005<br>(SOAP)"]
Caller --> ClsRSPrint
ClsPrint --> EnvApi["EnvironmentServiceBase / AppGlobal<br>(SAIF Environment API)"]
ClsRSPrint --> EnvApi
ReportBase --> EnvApi
Sequence diagram¶
The following diagram shows the primary distribute-document sequence through clsPrint, including the
MSMQ-versus-direct dispatch decision.
sequenceDiagram
participant Client
participant ClsPrint as clsPrint
participant MSMQ as MSMQ queue
participant Xpresso as xPression clsGenerate
Client->>ClsPrint: distributeDocument(package, xml)
alt Asynchronous = True
ClsPrint->>ClsPrint: StartMQTransaction
ClsPrint->>MSMQ: Send CompositeRequestClass (BinaryMessageFormatter)
ClsPrint->>ClsPrint: EndMQTransaction(True)
else Asynchronous = False
ClsPrint->>Xpresso: distributeDocument(package, xml, ImportInfo.ToString, PaperTray.Tray2)
Xpresso-->>ClsPrint: result
end
ClsPrint-->>Client: True
Design constraints¶
- All environment-specific configuration (endpoint URLs, MSMQ path, IDM path) is retrieved exclusively through
EnvironmentServiceBase; there is noConfigurationManager.AppSettingsusage in code. clsRSPrint's parameterised constructor isPrivate, so the environment service cannot be substituted from outside — only the ambientAppGlobal.EnvironmentServicepath is reachable.*- The library performs no database access; the
Oracle.ManagedDataAccesspackage is referenced only to satisfy the framework/runtimeDbProviderFactoriesregistration and is not exercised by any code here. ReportBase.xPrintconstructs itsclsPrintwith the parameterless constructor, so an injected environment service on the report is not propagated to the printer it uses.*IDMEnvsandReportBase.XpressoEnvironmentare declared but not consumed by any logic in this library.**
Related documentation¶
- Index
- Overview
- Dependencies
- Operations and processes
- Business rules
- API reference
- SAIF.Services.Imaging.Import
Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with ** could not be confirmed; treat as unknown until verified.
Sources¶
SAIF.Services.Printing/clsPrint.vbSAIF.Services.Printing/clsRSPrint.vbSAIF.Services.Printing/Reporting/IReport.vbSAIF.Services.Printing/Reporting/ReportBase.vbSAIF.Services.Printing/Reporting/XDesignXDocument.vbSAIF.Services.Printing/Reporting/XDesignXElement.vbSAIF.Services.Printing/app.configSAIF.Services.Printing/Web.configSAIF.Services.Printing/My Project/Settings.Designer.vbSAIF.Services.Printing/My Project/Settings.settings- SAIF.Services.Printing/clsPrint.vb
- SAIF.Services.Printing/clsRSPrint.vb
- SAIF.Services.Printing/Reporting/IReport.vb
- SAIF.Services.Printing/Reporting/ReportBase.vb
- SAIF.Services.Printing/Reporting/XDesignXDocument.vb
- SAIF.Services.Printing/Reporting/XDesignXElement.vb
- SAIF.Services.Printing/Reporting/ErrorDetail.vb