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¶
- Build collection criteria from the policy number and requested window.
- Assign SQL-008 in
BeforeRetrieveand bind the policy and window parameters for BUSINESS_AFFILIATE and AFFILIATE. - The query returns only type-
2rows, applies overlap-window filtering, and sorts by affiliate name (BR-AFF-005, BR-AFF-006, BR-AFF-009). - Iterate the returned reader, load one
clsPolicyPreferredWorkerper row, and add it to the collection. - 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
GetPolicyPreferredWorkerCollectionoverloads are wrappers that forward to the preferredGetPolicyPreferredWorkersmethods.
Related documentation¶
Sources¶
Business\SAIF.Business.Policy.Affiliate\clsPolicyPreferredWorkerCollection.vb