Persist group associations (insert / update / delete)¶
Persists group master data and enforces the row-count checks used by both singular and collection save paths.
| Field | Value |
|---|---|
| Operation ID | OP-003 |
| Trigger | Caller saves a group association or the collection |
| Inputs | — |
| Outputs | Rows persisted or generic/contention errors added to the object or collection. |
| Primary components | clsGroupAssociation and clsGroupAssociationCollection persistence overrides |
| Entry point | Business\SAIF.Business.Policy.Group\clsGroupAssociation.vb |
Steps¶
BeforeInsertbinds everyGROUP_ASSOCIATIONcolumn (:Code,:Name,:EffectiveDate,:GroupTypeCode,:GroupPlanCode,:GroupRenewalDate,:PMSGroupNumber, address block,:CreateDate,:CreateUser,:UpdateDate,:UpdateUser(30),:PMSGroupSubCode,:GroupEnrollForm(5),:CodeAcronym(5), endorsement codes, flags) and executesINSERT INTO GROUP_ASSOCIATION.AfterInsertchecksRowsAffected; if<> 1it callsAddErrorMessage("InsertError", "Insert Failed"), otherwiseMarkOld(). (BR-009)BeforeUpdatebinds the same columns plus the concurrency key and executesUPDATE GROUP_ASSOCIATION;AfterUpdateraisesAddErrorMessage("UpdateError", Messages.DBContentionError)whenRowsAffected <> 1, otherwiseMarkOld(). (BR-009, BR-010)BeforeDeleteexecutesDELETE GROUP_ASSOCIATION ... WHERE;AfterDeleteraisesAddErrorMessage("DeleteError", Messages.DBContentionError)when the row count is wrong, otherwise callsMarkNew()— the deleted instance is returned to the new state rather than discarded. (BR-011)- The collection variants report generic
"Delete Failed"/"Insert Failed"/"Update Failed"messages instead of the contention message. (BR-012) - Database statements executed or relied on by this operation: SQL-002, SQL-003, SQL-010, SQL-011, SQL-030, SQL-031, SQL-038, SQL-039; affected tables: DUAL, GROUP_ASSOCIATION.
- The update and delete variants SQL-030, SQL-031, SQL-038, and SQL-039 are truncated at a bare
Where. - Inherited BOF save behavior validates the object or collection, executes the configured criteria SQL, and surfaces row-count failures back on the business object before the caller continues.†
Process flow¶
The following diagram visualizes this operation's control flow.
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¶
- Collection persistence surfaces generic "Insert Failed" / "Update Failed" / "Delete Failed" messages through BR-012.
Related documentation¶
Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with ** could not be confirmed; treat as unknown until verified. Statements marked with
†were retrieved from dependency library documentation via the Legends CLI RAG service.
Sources¶
Business\SAIF.Business.Policy.Group\clsGroupAssociation.vb