---
title: SAIF.Business.Policy.Group architecture
summary: Architectural responsibilities and interaction patterns for SAIF.Business.Policy.Group.
status: draft
owner: Technical Writer
last_reviewed: 2026-07-31
library: SAIF.Business.Policy.Group
reference_type: package
---

# SAIF.Business.Policy.Group architecture

`SAIF.Business.Policy.Group` packages the policy-group domain into BOF business objects that read and write Oracle rows through inherited criteria and data-portal lifecycle hooks. The library is self-contained: it exposes no UI, outbound HTTP, file I/O, or stored procedures, and its only live runtime coupling is to the shared BOF base layer plus Oracle connectivity.

## Responsibilities
- Model group master data, chapters, contacts, discounts, underwriting criteria, significant classes, and policy-period membership.
- Apply local validation rules before rows are persisted.
- Use inherited BOF lifecycle behavior for create, retrieve, save, validation, and edit-session flows.†

## Component boundaries
- `clsGroupAssociation` owns the group master record and lazy chapter access.
- `clsChapter` / `clsContact` expose read-only chapter and contact retrieval; compiled source contains no chapter/contact write SQL.
- `clsGroupAssociationDiscount` implements `iAdjustedRateFactor` but does not invoke the rating engine itself.
- `clsGroupUnderwritingCriteria`, `clsClassSignificance`, and `clsSignificantClass(Collection)` own group eligibility inputs and classifications.
- `clsPolicyPeriodGroupAssociation` isolates the policy-period membership row from policy processing in other libraries.

## Interaction model
Callers create or retrieve BOF objects through static factory methods, the framework executes the criteria SQL against Oracle, the object fills its local state, and later save operations push the object's current field values back through `Before*` and `After*` lifecycle methods. Discount and underwriting consumers then read typed properties rather than interacting with SQL directly.

## Architecture diagram
The following diagram shows the library's main collaborators and storage boundary.

```mermaid
flowchart TD
    Caller[Policy, rating, or underwriting caller] --> GroupLib[SAIF.Business.Policy.Group]
    GroupLib --> Assoc[clsGroupAssociation / clsGroupAssociationCollection]
    GroupLib --> Chapter[clsChapter / clsContact]
    GroupLib --> Discount[clsGroupAssociationDiscount]
    GroupLib --> UW[clsGroupUnderwritingCriteria<br>clsClassSignificance<br>clsSignificantClassCollection]
    GroupLib --> Membership[clsPolicyPeriodGroupAssociation]
    GroupLib --> BOF[SAIF.Framework.Core lifecycle and data portal]
    BOF --> Oracle[(Oracle tables)]
```

## Sequence diagram
The following diagram shows a representative retrieve-and-use flow for group discount and underwriting data.

```mermaid
sequenceDiagram
    participant Caller
    participant Group as SAIF.Business.Policy.Group
    participant BOF as SAIF.Framework.Core
    participant Oracle
    Caller->>Group: GetGroupAssociationDiscount / GetGroupUnderwritingCriteria
    Group->>BOF: Build criteria request
    BOF->>Oracle: Execute RetrieveSQL
    Oracle-->>BOF: Result set
    BOF-->>Group: Filled business object
    Caller->>Group: Read typed properties or Factor(...)
    Group-->>Caller: Discount / underwriting values
```

## Design constraints
- Eight `CreateSQL` sequence reads still contain placeholder tokens instead of executable Oracle `NEXTVAL` syntax, so create-path sequence generation remains an open risk.**
- Nine write/retrieve statements are truncated at a bare `Where`, which makes those code paths non-executable as written.
- `clsContactCollection.vb` exists on disk but is excluded from compilation, so the library ships a narrower contact surface than the folder contents suggest.**
- Framework edit-session, rules, and traversal behaviors are inherited rather than implemented locally.†

## Related documentation
- [Index](index.md)
- [Overview](overview.md)
- [Dependencies](dependencies.md)
- [Operations and processes](operations-processes.md)
- [Business rules](business-rules.md)
- [Database tables](database-tables.md)
- [SQL catalog](sql/index.md)
- [API reference](api/index.md)

> **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.
> Statements marked with `†` were retrieved from dependency library documentation via the Legends CLI RAG service.

## Sources
- `Business\SAIF.Business.Policy.Group\SAIF.BOF.Business.Policy.Group.vbproj`
- `Business\SAIF.Business.Policy.Group\SAIF.BOF.Business.Policy.Group.nuspec`
- `Business\SAIF.Business.Policy.Group\packages.config`
- `Business\SAIF.Business.Policy.Group\app.config`
- `Business\SAIF.Business.Policy.Group\Web.config`
- `Business\SAIF.Business.Policy.Group\clsChapter.vb`
- `Business\SAIF.Business.Policy.Group\clsChapterCollection.vb`
- `Business\SAIF.Business.Policy.Group\clsClassSignificance.vb`
- `Business\SAIF.Business.Policy.Group\clsContact.vb`
- `Business\SAIF.Business.Policy.Group\clsGroupAssociation.vb`
- `Business\SAIF.Business.Policy.Group\clsGroupAssociationCollection.vb`
- `Business\SAIF.Business.Policy.Group\clsGroupAssociationDiscount.vb`
- `Business\SAIF.Business.Policy.Group\clsGroupAssociationDiscountCollection.vb`
- `Business\SAIF.Business.Policy.Group\clsGroupUnderwritingCriteria.vb`
- `Business\SAIF.Business.Policy.Group\clsPolicyPeriodGroupAssociation.vb`
- `Business\SAIF.Business.Policy.Group\clsSignificantClass.vb`
- `Business\SAIF.Business.Policy.Group\clsSignificantClassCollection.vb`
