Skip to content

Retrieve supporting policy aggregates

A complete policy view needs more than the header. This operation covers the supporting aggregates that each consuming screen assembles around it. They are grouped together because they all follow the same shape: a shared factory method builds criteria, the retrieve hook adds parameters and a result cursor, and the after-retrieve hook fills the object and marks it clean.

Field Value
Operation ID OP-09
Trigger A caller invokes one of the shared factory methods on a supporting business object
Inputs IDataPortalInfo plus the key for the aggregate being loaded
Outputs A populated business object or collection, marked clean
Primary components clsPolicyPeriodCollection, clsAgency, clsPolicyAddress, clsTeamAssignmentCollection, clsTradingAsCollection, clsNonEmployerAccount
Entry point Business/SAIF.Business.View.Policy/clsPolicyPeriodCollection.vb

Steps

  1. Call the shared factory method on the target type, supplying the data portal information and the key for the aggregate.
  2. Policy periods take a policy number and an optional count of most-recent periods to return (SQL-008).
  3. Agency takes a policy number (SQL-002).
  4. Addresses take either a policy number with address and contact types (SQL-005) or a location sequence number (SQL-006).
  5. Team assignments take a policy number (SQL-009).
  6. Trading-as records take either a policy number (SQL-011, TRADING_AS) or a single sequence number (SQL-010).
  7. Non-employer accounts take an account number (SQL-004, NON_EMPR_ACCT).
  8. Let the framework drive the retrieve lifecycle: the before-retrieve hook builds the request and adds parameters, and the after-retrieve hook fills the object and marks it clean.†
  9. Enrich the loaded aggregate where the type requires a second read:
  10. A policy period resolves its employer-liability limits on demand (SQL-023).
  11. An address resolves the officer of notice on demand, joining BUSINESS_AFFILIATE to AFFILIATE (SQL-012).
  12. A team assignment resolves the assignee's e-mail address through the system-user lookup (SQL-025); a legacy path targeting a procedure that could not be located also remains in the source (SQL-024).
  13. Validate the loaded object where a rule applies.
  14. A non-employer account with an account number of zero reports itself invalid (BR-010).
  15. Note the two authorization dependencies that these aggregates create:
  16. The loss-control team assignment loaded here is what the authorization check compares the user identifier against (BR-007).
  17. Demo users receive masked identity data in team assignments (BR-012).

Process flow

The following diagram visualizes this operation's control flow.

flowchart TD
    Start([Supporting aggregate requested]) --> F[Shared factory builds Criteria]
    F --> B[BeforeRetrieve adds parameters<br>and result cursor]
    B --> X[(Stored procedure or inline SELECT)]
    X --> A[AfterRetrieve fills the object<br>and marks it clean]
    A --> E{Second read needed?}
    E -->|Yes| Enr[Resolve limits, officer of notice,<br>or e-mail address]
    E -->|No| V[Evaluate validation rules]
    Enr --> V
    V --> Ok([Populated aggregate])

Failure and edge-case behavior

  • A key with no matching row yields an empty collection or an object that reports itself invalid, rather than an exception (BR-010).
  • The legacy e-mail lookup targets a procedure that was not located, so that path may be dead (SQL-024).
  • Each enrichment is a separate round trip, so a screen that shows limits, officer of notice, and e-mail addresses issues several additional calls.

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.

Sources

  • Business/SAIF.Business.View.Policy/clsPolicyPeriodCollection.vb
  • Business/SAIF.Business.View.Policy/clsPolicyPeriod.vb
  • Business/SAIF.Business.View.Policy/clsAgency.vb
  • Business/SAIF.Business.View.Policy/clsPolicyAddress.vb
  • Business/SAIF.Business.View.Policy/clsTeamAssignmentCollection.vb
  • Business/SAIF.Business.View.Policy/clsTeamAssignment.vb
  • Business/SAIF.Business.View.Policy/clsTradingAs.vb
  • Business/SAIF.Business.View.Policy/clsTradingAsCollection.vb
  • Business/SAIF.Business.View.Policy/clsNonEmployerAccount.vb