Skip to content

SAIF output-address retrieval

This operation loads all XSAIF LOCATION rows into a single clsSAIFOutputAddress object. The result centralizes configured output addresses such as return mail, EFT, and customer-service destinations.

Field Value
Operation ID OP-SB-06
Trigger Caller invokes GetSAIFOutputAddresses.
Inputs Data portal info
Outputs clsSAIFOutputAddress
Primary components clsSAIFOutputAddress.GetSAIFOutputAddresses, clsSAIFOutputAddress.Criteria.BeforeRetrieve, clsSAIFOutputAddress.AfterRetrieve, clsSAIFOutputAddress.GetFormattedAddress
Entry point Business\SAIF.Business\clsSAIFOutputAddress.vb

Steps

  1. GetSAIFOutputAddresses creates criteria for the fixed company code XSAIF and submits a retrieval request.
  2. The criteria query every LOCATION row for that company and return the ordered result set to the business object (SQL-033, LOCATION).
  3. AfterRetrieve iterates through the returned rows, maps each location name to the library's address-description enum, and stores the corresponding clsAddress object in the address dictionary (SQL-033, LOCATION).
  4. The object marks itself invalid when no qualifying rows were returned, enforcing the requirement that at least one XSAIF address must exist (BR-SB-009).
  5. Consumers call GetAddress or GetFormattedAddress to retrieve either the structured clsAddress or a newline-formatted mailing block for a specific destination.

Process flow

The following diagram visualizes this operation's control flow.

flowchart TD
    Start([Output-address request]) --> Query[Query LOCATION rows for XSAIF]
    Query --> Rows{Rows returned?}
    Rows -->|No| Invalid([Return invalid object])
    Rows -->|Yes| Map[Map rows to address descriptions]
    Map --> Format[Expose structured or formatted addresses]
    Format --> End([Return output-address object])

Failure and edge-case behavior

  • When the query returns no XSAIF rows, the object is invalid by design (BR-SB-009).
  • Unknown or unmapped location descriptions are ignored unless the caller requests that specific address later.

Sources

  • Business\SAIF.Business\clsSAIFOutputAddress.vb