Skip to content

SAIF.Business.Policy architecture

SAIF.Business.Policy is a packaged business/domain library that supplies the shared policy vocabulary used by higher-level SAIF BOF applications. It does not host UI, endpoints, or jobs; instead, callers bring the data-portal context and consume the library's interfaces, translation helpers, and targeted Oracle lookups.

Responsibilities

  • Define policy-domain contracts implemented by other libraries.
  • Translate persisted codes into policy-domain enums and code maps.
  • Retrieve hazard-group and policy metadata through the BOF data portal.
  • Invoke Oracle package logic for minimum-premium and ownership decisions.

Component boundaries

  • PolicyInformation: direct portal-request façade for scalar queries and stored-procedure calls.
  • clsHazardGroup and clsHazardGroupCollection: read-only BOF business objects loaded through IBusinessCriteria.
  • CodeMaps and Enums: reusable translation layer between database codes and typed domain values.
  • Institutions: generated dataset contract for routing/institution reference data.*

Interaction model

  • Callers supply IDataPortalInfo, which carries the portal id, user context, and data-access abstraction.
  • PolicyInformation builds request objects directly and executes them immediately.
  • clsHazardGroupCollection delegates retrieval to inherited BOF lifecycle hooks*, then materializes clsHazardGroup instances from the returned reader.
  • Code-map constructors load code tables once per process and reuse them until refresh is requested.*

Architecture diagram

The following diagram shows the high-level interaction patterns across the library.

flowchart TD
  Caller[Calling application] --> PI[PolicyInformation]
  Caller --> HG[clsHazardGroupCollection]
  Caller --> CM[CodeMaps / Enums]
  PI --> DPI[IDataPortalInfo / IDataAccess]
  HG --> DPI
  CM --> DPI
  DPI --> Oracle[(Oracle)]

Sequence diagram

The following diagram shows the primary read-only hazard-group retrieval sequence.

sequenceDiagram
  participant Client
  participant Collection as clsHazardGroupCollection
  participant Framework as SAIF.Framework.Core*
  participant Oracle
  Client->>Collection: GetHazardGroups(dpi, effectiveDate)
  Collection->>Framework: RetrieveObject(criteria)
  Framework->>Oracle: Execute SQL-002
  Oracle-->>Framework: IDataReader
  Framework-->>Collection: Invoke AfterRetrieve
  Collection-->>Client: Populated clsHazardGroupCollection

Design constraints

  • Connection selection stays outside the library and depends on the caller-supplied portal id.
  • Hazard-group persistence paths are intentionally blocked; only retrieval is implemented.
  • Unknown domain codes map to safe defaults instead of raising.
  • PolicyMinimumPremium suppresses data-access exceptions and returns a defaulted result.*

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

  • Business\SAIF.Business.Policy\PolicyInformation.vb
  • Business\SAIF.Business.Policy\clsHazardGroup.vb
  • Business\SAIF.Business.Policy\clsHazardGroupCollection.vb
  • Business\SAIF.Business.Policy\Enums.vb
  • Business\SAIF.Business.Policy\CodeMaps\clsBenefitJurisdictionCodeMap.vb
  • Business\SAIF.Business.Policy\CodeMaps\clsManualClassTypeCodeMap.vb