SAIF.Business.View.Policy architecture¶
SAIF.Business.View.Policy is a business/domain library in the SAIF BOF (Business Object Framework) stack that provides a read-only, policy-centric view of data for consumers such as the LegalMaintenance web application and SAIF.Business.Claim.Legal.* It aggregates policy header, period, address, agency, team, and association data behind the clsPolicyData root, and it is the only library in scope for this run that reaches two distinct databases: Oracle (primary) and SQL Server, referred to internally as "BDS" (secondary, security-only).
Responsibilities¶
- Provide a read-only projection of policy data: every
IBusinessCriteriaimplementation in the library returns an empty string or throws forCreateSQL,InsertSQL,UpdateSQL, andDeleteSQL; onlyRetrieveSQLand dedicated retrieval-only SQL properties carry statements.* - Serve as the aggregate root and entry point for consumers via
clsPolicyData.GetPolicyData, exposing lazily-populated child collections (Agency,PolicyAddress,PolicyPeriods,TeamAssignmentCollection,TradingAsCollection,Associations).* - Maintain the current policy-to-policy association model (
PolicyAssociations.vb,Associations/folder) alongside the older,<Obsolete>affiliate model (clsAffiliatedPolicy*,AffiliateTypes), both still reachable fromclsPolicyData. - Enforce policy-level authorization (
clsPolicySecurity), combining an Active Directory resource check (SAIFpolicyInfo) with a per-user-type data-access matrix and per-user-type policy-list stored procedures (BR-VP-003, BR-VP-005). - Apply demo-user data masking to names, addresses, and identifiers inside the business objects themselves rather than at the UI layer (BR-VP-010).*
Component boundaries¶
clsPolicyData(aggregate root): central policy view; implementsiPayee; owns lazy-read logic for detail, waiver, gaps, secondary status, coverage-bound flag, and information-page-printed flag.clsPolicyPeriod/clsPolicyPeriodCollection: policy period (term) data and current/renewal period selection (BR-VP-018).clsPolicyAddress(inheritsclsAddress),clsAgency,clsNonEmployerAccount,clsTradingAs/clsTradingAsCollection,clsTeamAssignment/clsTeamAssignmentCollection: policy-adjacent entities retrieved as children ofclsPolicyData.Associations/(clsAssociationTypeCode,clsAssociationTypeCodeCollection,clsPolicyHeaderAssociation,clsPolicyHeaderAssociationFactory,clsAssociationTypeFactory) plusPolicyAssociations.vb: current policy-relationship model (categoriesPR/MR).clsAffiliatedPolicy/clsAffiliatedPolicyCollection: legacy affiliate model, retained but<Obsolete>.clsPolicySecurity(withIPolicySecurityDataProvider,strPolicyList): the sole authorization boundary in the library; also owns the secondary SQL Server ("BDS") data layer, created viaclsSQLDataLayerinInitialize().Institutions(generated typed DataSet): compiled but no consuming code was found within this library.**
Interaction model¶
- Consumers (
LegalMaintenance,SAIF.Application.Claim.Legal,SAIF.Business.Claim.Legal) callclsPolicyData.GetPolicyDatato obtain the aggregate root, then navigate to child properties, which are populated on first access rather than eagerly.* clsPolicyDataand its children execute Oracle retrieval statements through the BOF DPI (IDataRequest), using:-style bind parameters andpk#####_package procedures.clsPolicySecurityindependently executes SQL Server ("BDS") stored procedures (cp_*) through a data layer it creates itself, using@-style parameters; this is the only code path in the library that reaches the SQL Server database.clsPolicySecurityalso callsSecurityPrincipal.IsAuthorized(SAIF.Framework.Security) for theSAIFpolicyInfoActive Directory resource check.- Downstream Oracle package/procedure and SQL Server procedure bodies reside outside this repository and were not available for verification.**
Architecture diagram¶
The following diagram shows high-level component interactions across both database boundaries.
flowchart TD
Consumer[Consumer<br>LegalMaintenance / SAIF.Business.Claim.Legal] --> PolicyData[clsPolicyData<br>aggregate root]
PolicyData --> Period["clsPolicyPeriod(Collection)"]
PolicyData --> Address[clsPolicyAddress]
PolicyData --> Agency[clsAgency]
PolicyData --> Team["clsTeamAssignment(Collection)"]
PolicyData --> TradingAs["clsTradingAs(Collection)"]
PolicyData --> Associations["Associations /<br>PolicyAssociations"]
PolicyData --> Affiliated["clsAffiliatedPolicy(Collection)<br>legacy, Obsolete"]
PolicyData --> DPI[BOF DPI<br>IDataRequest]
Security[clsPolicySecurity] --> AD[SecurityPrincipal.IsAuthorized<br>SAIFpolicyInfo]
Security --> SQLLayer[clsSQLDataLayer]
DPI --> Oracle[(Oracle<br>pk#####_ packages)]
SQLLayer --> BDS[(SQL Server BDS<br>cp_* procedures)]
Sequence diagram¶
The following diagram shows the primary policy-retrieve sequence, including the lazy detail read.
sequenceDiagram
participant Consumer
participant PolicyData as clsPolicyData
participant DPI as BOF DPI
participant Oracle
Consumer->>PolicyData: GetPolicyData(policyNum)
PolicyData->>DPI: RetrieveSQL (pk73094_policy_data.getpolicy)
DPI->>Oracle: execute with bind parameters
Oracle-->>DPI: policy row
DPI-->>PolicyData: populated fields
PolicyData-->>Consumer: clsPolicyData instance
Consumer->>PolicyData: PolicyDetail (first access)
PolicyData->>DPI: RetrieveDetailSQL (pk72846_view_policy.getviewdetail)
DPI->>Oracle: execute
Oracle-->>DPI: detail row
DPI-->>PolicyData: detail fields (lazy-populated)
Design constraints¶
- Read-only by contract: create/insert/update/delete SQL properties are non-functional across all
Criteriaclasses (BR-VP-027); mutation must occur through other libraries. - Two independent data stores must be reachable: Oracle for all domain retrieval, and SQL Server ("BDS") exclusively for
clsPolicySecuritypolicy-list and group-membership queries. IPolicySecurityDataProvideris declared but has no implementing type in this repository; any external implementation is unverified.**- Seven
.vbfiles (MCO, payroll class, policy search, an older association type) exist on disk but are excluded from the<Compile>item group and do not affect the shipped assembly.* - The library is not packaged or published from this repository; no NuGet pack/push step exists in its pipelines.
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.
Related documentation¶
- Index
- Overview
- Dependencies
- Configuration
- Operations and processes
- Business rules
- Security and authorization
- Database tables
- SQL catalog
- Procedures
- API reference
Sources¶
SAIF.Business.View.Policy/clsPolicyData.vbSAIF.Business.View.Policy/clsPolicySecurity.vbSAIF.Business.View.Policy/clsPolicyPeriod.vbSAIF.Business.View.Policy/clsTeamAssignment.vbSAIF.Business.View.Policy/clsTeamAssignmentCollection.vbSAIF.Business.View.Policy/Associations/clsPolicyAssociation.vbSAIF.Business.View.Policy/clsPolicySecurity.vbSAIF.Business.View.Policy/clsPolicyData.vbSAIF.Business.View.Policy/clsTeamAssignment.vbSAIF.Business.View.Policy/clsTeamAssignmentCollection.vbSAIF.Business.View.Policy/app.configSAIF.Business.View.Policy/Web.config