---
title: Retrieve all group associations
summary: Retrieve the full group catalog for in-memory filtering.
status: draft
owner: Technical Writer
last_reviewed: 2026-07-31
library: SAIF.Business.Policy.Group
reference_type: package
operation_id: OP-002
trigger: Caller needs the full group catalog for selection or filtering
---

# Retrieve all group associations

Loads the full set of groups, then expects callers to apply in-memory filters for type, expiration, or sales plan.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-002 |
| **Trigger** | Caller needs the full group catalog for selection or filtering |
| **Inputs** | — |
| **Outputs** | A populated `clsGroupAssociationCollection`. |
| **Primary components** | `clsGroupAssociationCollection.GetGroupAssociations` |
| **Entry point** | `Business\SAIF.Business.Policy.Group\clsGroupAssociationCollection.vb` |

## Steps

1. Construct the collection `Criteria` and call `RetrieveObject`.
2. `BeforeRetrieve` sets the collection `RetrieveSQL` (no key parameters — the whole `GROUP_ASSOCIATION` table).
   - Risk: this retrieve path uses [SQL-022](../sql/SQL-022-saif-business-policy-group.md) with no `WHERE` clause, so filtering happens in memory after the full table is loaded.
3. `AfterRetrieve` loops the reader, constructing a `clsGroupAssociation` per row and adding it to the inner list; the collection is marked old.
4. Callers narrow the result in memory with the extension filters `GroupType(...)`, `NotExpired(asOfDate)` and `SalesPlan(...)`. ([BR-002](../business-rules.md#br-002-group-expiration-is-date-effective), [BR-003](../business-rules.md#br-003-group-type-derives-from-stored-code), [BR-004](../business-rules.md#br-004-salesplan-excludes-listed-plan-codes))
5. Database statements executed or relied on by this operation: [SQL-022](../sql/SQL-022-saif-business-policy-group.md); affected tables: [GROUP_ASSOCIATION](../database-tables.md#group_association).

## Process flow

The following diagram visualizes this operation's control flow.

```mermaid
flowchart TD
    Start([Trigger]) --> Step1[Build criteria / load state]
    Step1 --> Step2[Apply local business logic]
    Step2 --> Decision{Valid and complete?}
    Decision -->|Yes| Step3[Return data or persist rows]
    Decision -->|No| EndErr([Return BOF validation or SQL-state issues])
    Step3 --> EndOk([Operation completes])
```

## Failure and edge-case behavior

- [SQL-022](../sql/SQL-022-saif-business-policy-group.md) returns every row from [GROUP_ASSOCIATION](../database-tables.md#group_association); consumers depend on in-memory filters afterward.

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [SQL catalog](../sql/index.md)
- [Database tables](../database-tables.md)
## Sources
- `Business\SAIF.Business.Policy.Group\clsGroupAssociationCollection.vb`
