Skip to content

Print preview and document distribution

This workflow renders legal correspondence and reports for preview and distributes them either synchronously (SOAP) or asynchronously (MSMQ) via xPression, or via SSRS, using a shared imaging metadata contract.

Field Value
Operation ID OP-APP-004
Trigger User selects "Print" on a maintenance screen, opening frmPrintPreview.aspx
Libraries involved SAIF.Services.Printing, SAIF.Services.Imaging.Import
Screens Print Preview screen (frmPrintPreview.aspx)
Inputs Claim/legal context metadata, selected document/report
Outputs Rendered document bytes streamed to the browser, or a queued xPression distribution request

Steps

  1. User selects "Print" on a maintenance screen; frmPrintPreview.aspx is opened as a popup.
  2. Code-behind calls SAIF.Services.Printing's clsPrint.previewDocument(...), which builds an xPression document request.
  3. clsPrint composes a clsImageImport (from SAIF.Services.Imaging.Import) whose ToString() emits a newline-delimited key/value metadata block describing the claim/legal context (BR-APP-005).
  4. Depending on the call path, clsPrint either streams the rendered document bytes back to the browser synchronously (SOAP) or enqueues it via MSMQ for asynchronous xPression distribution.

Process flow

The following diagram visualizes the print preview and document distribution workflow.

flowchart TD
    Start([User selects Print]) --> S1["frmPrintPreview opens as<br>popup"]
    S1 --> S2["clsPrint.previewDocument<br>builds xPression request"]
    S2 --> S3["clsImageImport.ToString<br>emits metadata block"]
    S3 --> D{"Synchronous or async<br>distribution?"}
    D -->|Synchronous SOAP| S4["Stream rendered document to<br>browser"]
    D -->|Asynchronous| S5["Enqueue via MSMQ for<br>xPression"]
    S4 --> EndOk([Document delivered])
    S5 --> EndOk

Failure and edge-case behavior

  • Authorization for frmPrintPreview rests entirely on the caller already having produced the report into the session model plus possession of the __SAIFPID view ID; there is no explicit resource check on the print preview endpoint itself.

Sources