Skip to content

Retrieve preferred workers for a policy

This operation documents how clsPolicyPreferredWorkerCollection.GetPolicyPreferredWorkers fulfills the policy-affiliate behavior described for SAIF.Business.Policy.Affiliate.

Field Value
Operation ID OP-008
Trigger A caller requests all preferred workers that overlap a policy date window.
Inputs IDataPortalInfo, policy number, optional start date, optional end date
Outputs clsPolicyPreferredWorkerCollection
Primary components clsPolicyPreferredWorkerCollection.GetPolicyPreferredWorkers
Entry point Business\SAIF.Business.Policy.Affiliate\clsPolicyPreferredWorkerCollection.vb

Steps

  1. Build collection criteria from the policy number and requested window.
  2. Assign SQL-008 in BeforeRetrieve and bind the policy and window parameters for BUSINESS_AFFILIATE and AFFILIATE.
  3. The query returns only type-2 rows, applies overlap-window filtering, and sorts by affiliate name (BR-AFF-005, BR-AFF-006, BR-AFF-009).
  4. Iterate the returned reader, load one clsPolicyPreferredWorker per row, and add it to the collection.
  5. Return the populated collection.

Process flow

The following diagram shows the type-2 overlap-window query and per-row child hydration.

flowchart TD
  Start(["Caller requests policy preferred workers"]) --> Criteria["Build collection Criteria for policy + window"]
  Criteria --> Before["BeforeRetrieve: assign SQL-008<br>bind policy + window against BUSINESS_AFFILIATE + AFFILIATE"]
  Before --> Query["Query returns type-2 rows,<br>overlap-window filtered, sorted by name"]
  Query --> Iterate["Iterate reader"]
  Iterate --> AddChild["Load one clsPolicyPreferredWorker per row<br>and add to collection"]
  AddChild --> More{"More rows?"}
  More -->|Yes| Iterate
  More -->|No| Result(["Return populated collection"])

Failure and edge-case behavior

  • The obsolete GetPolicyPreferredWorkerCollection overloads are wrappers that forward to the preferred GetPolicyPreferredWorkers methods.

Sources

  • Business\SAIF.Business.Policy.Affiliate\clsPolicyPreferredWorkerCollection.vb