SAIF.Business.View.Policy operations and processes¶
This page is the operation catalog and cross-operation hub for SAIF.Business.View.Policy. Each operation's detailed, step-by-step logic lives in its own page under operations/.
The nine operations divide into three groups: loading a policy and its supporting data (Retrieve policy header, Lazy-load policy detail, Check waiver existence, Retrieve supporting policy aggregates), resolving how policies relate to one another (Resolve policy associations, Resolve policy-header associations), and deciding what the signed-in user is allowed to see (Authorize a policy for the current user, Build the permitted policy list, Retrieve affiliated policies).
Operation catalog¶
| Operation | Intent | Trigger | Inputs | Outputs | Rules | Tables | SQL |
|---|---|---|---|---|---|---|---|
| Retrieve policy header | Load the policy header that every other policy read depends on | A caller requests a policy view | IDataPortalInfo, policy number, and an optional UserAccessLevels value |
A populated clsPolicyData marked clean |
BR-009, BR-011 | — | SQL-007 |
| Lazy-load policy detail | Load the extended policy detail block on first use | A detail-backed property is read for the first time | The already-loaded clsPolicyData instance |
Roughly twenty detail fields populated on the same instance | BR-014 | CANCELLATION, PA_AUDIT | SQL-014, SQL-015, SQL-016, SQL-017, SQL-018, SQL-020, SQL-021 |
| Check waiver existence | Answer whether a policy carries a third-party waiver | clsPolicyData.HasWaiver is read for the first time |
The policy number held by the loaded clsPolicyData |
A boolean waiver indicator cached on the instance | — | — | SQL-022 |
| Resolve policy associations | List every policy associated with a policy, across four association families | clsPolicyData.Associations is first accessed, a preferred association type is assigned, or a caller invokes the list directly |
IDataPortalInfo, policy number, an include-source-policy flag, and an optional as-of date |
A sequence of PolicyAssociation values |
BR-014, BR-015, BR-016 | POLICY_RELATIONSHIP, POLICY, COMBO_POLICY_PERIOD, POLICY_PERIOD, ER_COMBINATION_POLICY | SQL-026, SQL-027 |
| Resolve policy-header associations | Resolve the associations shown in a policy header, driven by the association type code table | A caller requests policy-header associations for a policy | IDataPortalInfo and a policy number |
A sequence of IPolicyHeaderAssociation values with attached period date ranges |
BR-014, BR-015, BR-017 | ASSOCIATION_TYPE_CODE, POLICY_PERIOD_ALL, ENDORSEMENT, POLICY_PERIOD_NON_WCIS | SQL-003, SQL-013, SQL-019, SQL-028, SQL-029 |
| Authorize a policy for the current user | Decide whether the signed-in principal may view a policy | A consumer asks whether the current principal may see a policy | A clsSecurityPrincipal and IDataPortalInfo supplied to the constructor, plus the target policy or policy number |
A boolean access decision | BR-001, BR-002, BR-003, BR-004, BR-005, BR-006, BR-007, BR-008 | PA_AUDIT | SQL-007, SQL-009, SQL-026 |
| Build the permitted policy list | Produce the list of policies the signed-in principal may see | clsPolicySecurity.PolicyList is read for the first time |
The principal supplied to the constructor | A cached list of permitted policy numbers and names | BR-018, BR-019 | PA_AUDIT | — |
| Retrieve affiliated policies | List the policies affiliated with a policy under one affiliation family | A caller requests the affiliated policy collection for a policy | IDataPortalInfo, policy number, affiliate type, totals flag, and optional agent or agency filters |
A populated clsAffiliatedPolicyCollection with the source policy marked current |
BR-011, BR-020 | — | SQL-001 |
| Retrieve supporting policy aggregates | Load the supporting aggregates that complete a policy view | A caller invokes one of the shared factory methods on a supporting business object | IDataPortalInfo plus the key for the aggregate being loaded |
A populated business object or collection, marked clean | BR-007, BR-010, BR-012 | NON_EMPR_ACCT, TRADING_AS, BUSINESS_AFFILIATE, AFFILIATE | SQL-002, SQL-004, SQL-005, SQL-006, SQL-008, SQL-009, SQL-010, SQL-011, SQL-012, SQL-023, SQL-024, SQL-025 |
Process flow diagram¶
The following diagram visualizes the primary operational flow across operations.
flowchart TD
Start([Consumer requests a policy view]) --> Auth[Authorize the policy<br>for the current user]
Auth --> D{Access permitted?}
D -->|No| Deny([Refuse the request])
D -->|Yes| Head[Retrieve the policy header]
Head --> Detail[Lazy-load policy detail<br>on first property read]
Head --> Assoc[Resolve policy associations]
Head --> Support[Retrieve supporting aggregates]
Assoc --> Header[Resolve policy-header associations]
Assoc --> Affil[Retrieve affiliated policies]
Detail --> Waiver[Check waiver existence]
Auth --> List[Build the permitted policy list]
Support --> View([Assembled policy view])
Header --> View
Affil --> View
Waiver --> View
List --> View
Inherited operations and processes¶
Operations in this section originate from base classes provided by the SAIF.Framework.Core dependency. They are inherited rather than implemented in this library, and their steps are embedded inline in the consuming operation pages.
From clsBusinessBase (SAIF.Framework.Core)¶
| Operation | Intent | Provided by | Origin | Embedded in |
|---|---|---|---|---|
| Retrieve object through the data portal | Execute a criteria-described read and drive the before- and after-retrieve hooks around it† | clsBusinessBase |
SAIF.Framework.Core |
Retrieve policy header |
| Evaluate broken rules | Re-evaluate registered validation rules and expose the result through IsValid† |
clsRulesManager |
SAIF.Framework.Core |
Retrieve policy header |
From clsBusinessCollectionBase (SAIF.Framework.Core)¶
| Operation | Intent | Provided by | Origin | Embedded in |
|---|---|---|---|---|
| Retrieve a collection through the data portal | Execute a criteria-described read and populate the collection from the result set† | clsBusinessCollectionBase |
SAIF.Framework.Core |
Retrieve supporting policy aggregates |
| Track removed members | Move removed items into a deleted-items list so removals stay distinguishable† | clsBusinessCollectionBase |
SAIF.Framework.Core |
Retrieve affiliated policies |
Origin: These operations are defined in
SAIF.Framework.Coreand inherited by every business object and collection in this library. Their step-by-step logic is embedded inline, withOrigincallouts, in the consuming operation pages.
Database interactions¶
The following table summarizes which operations read from the database. Per-step SQL and table citations live in each operation's detail page.
| Operation | SQL | Tables | Type |
|---|---|---|---|
| Retrieve policy header | SQL-007 | N/A — stored procedure | Read |
| Lazy-load policy detail | SQL-014, SQL-015, SQL-016, SQL-017, SQL-018, SQL-020, SQL-021 | CANCELLATION, PA_AUDIT | Read |
| Check waiver existence | SQL-022 | N/A — stored procedure | Read |
| Resolve policy associations | SQL-026, SQL-027 | POLICY_RELATIONSHIP, POLICY, COMBO_POLICY_PERIOD, POLICY_PERIOD, ER_COMBINATION_POLICY | Read |
| Resolve policy-header associations | SQL-003, SQL-013, SQL-019, SQL-028, SQL-029 | ASSOCIATION_TYPE_CODE, POLICY_PERIOD_ALL, ENDORSEMENT, POLICY_PERIOD_NON_WCIS | Read |
| Authorize a policy for the current user | SQL-007, SQL-009, SQL-026 | PA_AUDIT | Read |
| Build the permitted policy list | — | PA_AUDIT | Read |
| Retrieve affiliated policies | SQL-001 | N/A — stored procedure | Read |
| Retrieve supporting policy aggregates | SQL-002, SQL-004, SQL-005, SQL-006, SQL-008, SQL-009, SQL-010, SQL-011, SQL-012, SQL-023, SQL-024, SQL-025 | NON_EMPR_ACCT, TRADING_AS, BUSINESS_AFFILIATE, AFFILIATE | Read |
No operation writes to the database (BR-021).
Failure and edge-case behavior¶
- Authorization fails closed: an unrecognised user type is refused and produces an empty policy list (BR-019, BR-002).
- A failed lazy detail load is swallowed, leaving the policy header usable but the detail fields empty (BR-014).
- Association rows whose type code is unknown are either retained as not specified or dropped, depending on the path taken (BR-015, BR-017).
- Four of the six permitted-policy-list branches depend on a separately configured SQL Server store, so a configuration error narrows visibility silently. See Configuration.**
Note: Statements marked with
†are derived from dependency library documentation via the Legends CLI. Statements marked with*were inferred from code structure or contextual evidence. Statements marked with**could not be confirmed; treat as unknown until verified.
Related documentation¶
- Index
- Overview
- Architecture
- Dependencies
- Business rules
- Security and authorization
- Database tables
- SQL catalog
- Procedures
- API reference
- Configuration
Sources¶
Business/SAIF.Business.View.Policy/Associations/clsAssociationTypeCode.vbBusiness/SAIF.Business.View.Policy/Associations/clsAssociationTypeCodeCollection.vbBusiness/SAIF.Business.View.Policy/Associations/clsAssociationTypeFactory.vbBusiness/SAIF.Business.View.Policy/Associations/clsPolicyHeaderAssociationFactory.vbBusiness/SAIF.Business.View.Policy/PolicyAssociations.vbBusiness/SAIF.Business.View.Policy/clsAffiliatedPolicy.vbBusiness/SAIF.Business.View.Policy/clsAffiliatedPolicyCollection.vbBusiness/SAIF.Business.View.Policy/clsAgency.vbBusiness/SAIF.Business.View.Policy/clsNonEmployerAccount.vbBusiness/SAIF.Business.View.Policy/clsPolicyAddress.vbBusiness/SAIF.Business.View.Policy/clsPolicyData.vbBusiness/SAIF.Business.View.Policy/clsPolicyPeriod.vbBusiness/SAIF.Business.View.Policy/clsPolicyPeriodCollection.vbBusiness/SAIF.Business.View.Policy/clsPolicySecurity.vbBusiness/SAIF.Business.View.Policy/clsTeamAssignment.vbBusiness/SAIF.Business.View.Policy/clsTeamAssignmentCollection.vbBusiness/SAIF.Business.View.Policy/clsTradingAs.vbBusiness/SAIF.Business.View.Policy/clsTradingAsCollection.vb
Stored procedure operations¶
Operations implemented in the Oracle stored procedures that this library calls.
| Operation | Description | Source | Link |
|---|---|---|---|
| Retrieve policy header | Returns the single-row policy header for a policy number, including a live-computed cancellation status | pk73094_policy_data.getpolicy |
Details |
| Retrieve policy detail | Returns extended detail: group, plan, gap indicator, combination flags, and governing class | pk72846_view_policy.getviewdetail |
Details |
| Classify policy affiliation (superseded) | Resolves a policy's affiliation classification through a fixed precedence hierarchy | pk72846_view_policy.getpolicyaffiliatetype |
Details |
| Resolve parent policy (superseded) | Resolves the parent policy number for an affiliated policy | pk72846_view_policy.getparentpolicy |
Details |
| Retrieve wrap-up legal name | Returns the legal name resolved up the wrap-up and rate-account chain | pk72846_view_policy.getwrapuplegalname |
Details |
| Retrieve coverage gaps | Returns date ranges representing gaps in coverage | pk72846_view_policy.getgaps |
Details |
| Retrieve agency and producer | Returns the agent-of-record's agency and producer contact and address details | pk72846_view_policy.getagency |
Details |
| Retrieve policy address by type | Returns the best-matching address and contact row for a policy and address type, with mailing-address fallback | pk72846_view_policy.getpolicyaddress |
Details |
| Retrieve policy address by location | Returns the highest-priority contact for a specific location sequence number | pk72846_view_policy.getpolicyaddressbylocseqnum |
Details |
| Retrieve policy periods | Returns all or the most recent N policy periods with masked and derived risk, plan, and premium data | pk72846_view_policy.getpolicyperiods |
Details |
| Retrieve affiliated policy list | Returns member and parent policies for an affiliation family, with an optional totals row | pk72846_view_policy.getpolicyaffiliatelist |
Details |
| Retrieve team assignments | Returns SAIF staff team assignments plus office, customer-service-team, agency, and producer pseudo-rows | pk72846_view_policy.team_assign_query |
Details |
| Check waiver existence | Returns the count of waiver records for a policy | Pk82033_ThirdParty.get_policy_waiver_count |
Details |
| Retrieve employer-liability limits | Returns statutory employer-liability coverage limits for a policy period with a specific-to-default fallback | coveragelimits_pkg.getSpecificLimitsForPolicyNum |
Details |
| Derive secondary cancel status | Derives a human-readable collection and cancellation status for a policy | sp72268_get_cancel_status |
Details |
| Determine coverage-bound flag | Returns whether a policy in application status has bound coverage | sp73089_get_policy_bound_flag |
Details |
| Determine information-page-printed flag | Returns whether the information page for a policy period has printed | sp72347_info_page_printed_yn |
Details |
| Look up external client e-mail | Resolves a system user's e-mail address by mail identifier and last name | sp73341_external_client_lookup |
Details |
| Look up external client e-mail — query (legacy, SQL Server) | Queries the SQL Server Net_Registrant table for a matching, active, non-test registrant by ID number and last name |
cp_external_client_lookup |
Details |
| Look up external client e-mail — result selection (legacy, SQL Server) | Returns the most recently updated matching row (or none) to the .NET caller | cp_external_client_lookup |
Details |