SAIF.Business.Claim.Authority operations and processes¶
This page is the operation catalog and cross-operation hub for SAIF.Business.Claim.Authority. The library exposes six operations: loading and saving an employee's grant authority together with the two limit collections it governs (business function limits and reserve-category change limits), the amount/approval-type checks that back the limit rules' authority-ceiling validation, and the shared reference code lookups used throughout. Each operation's detailed, step-by-step logic lives in its own page under operations/.
Operation catalog¶
| Operation | Intent | Trigger | Inputs | Outputs | Rules | Tables | SQL |
|---|---|---|---|---|---|---|---|
| Claim authority initialization | Load an employee's grant authority, business function limits, and category change limits, creating a default grant authority if none exists | clsClaimAuthority.GetByMailID / GetByEmplID for a business process |
EmplID/MailID, BusinessProcessCode or BusinessProcesses enum |
Populated clsClaimAuthority aggregate |
BR-002 | CL_CLAIM_EMP_AUTH_TYPE, CL_CLAIM_EMP_BUS_FUNC_LIMIT, CL_CLAIM_EMP_CAT_CHANGE_LIMIT | SQL-014, SQL-015, SQL-017 |
| Claim authority save | Validate and persist a dirty grant authority together with any dirty limit rows, stamping the authorizing employee | Caller calls clsClaimAuthority.Save() after editing the aggregate |
Dirty state of grant authority and limit collections; AuthorizingEmployee.ID; IsSecurityOverride |
Persisted CL_CLAIM_EMP_AUTH_TYPE row; cascaded child saves; broken-rule errors |
BR-001, BR-002, BR-012 | CL_CLAIM_EMP_AUTH_TYPE | SQL-003, SQL-018, SQL-021 |
| Business function limit maintenance | Retrieve and validate per-employee, per-business-function dollar limits before persisting | Retrieved via authority initialization; caller edits rows and calls Save() |
EmployeeEmplid, ClaimBusProcessCode, ClaimBusFunctionCode, ClaimAuthPurposeCode, MaxAmount, ExpDate |
Persisted CL_CLAIM_EMP_BUS_FUNC_LIMIT rows; broken-rule errors |
BR-003, BR-004, BR-005, BR-006, BR-007 | CL_CLAIM_EMP_BUS_FUNC_LIMIT | SQL-001, SQL-004, SQL-015, SQL-019, SQL-022 |
| Category change limit maintenance | Retrieve and validate per-employee reserve-category dollar limits before persisting | Retrieved via authority initialization; caller edits rows and calls Save() |
EmployeeEmplid, ClaimCostCategoryCode, ClaimAuthPurposeCode, MaxChangeAmount, ExpDate |
Persisted CL_CLAIM_EMP_CAT_CHANGE_LIMIT rows; broken-rule errors |
BR-008, BR-009, BR-010, BR-013, BR-011 | CL_CLAIM_EMP_CAT_CHANGE_LIMIT | SQL-002, SQL-005, SQL-016, SQL-017, SQL-020, SQL-023 |
| Authorization amount and approval-type checks | Determine whether the authorizing employee's own limits cover a requested amount or approval type | Invoked internally by the limit-row validation rules | Business function or category code, authority purpose code, requested amount | Boolean amount/approval-type authorization result | Backs BR-005, BR-007, BR-010, BR-011 | CL_CLAIM_EMP_BUS_FUNC_LIMIT, CL_CLAIM_EMP_CAT_CHANGE_LIMIT | None catalogued* |
| Authority reference code lookups | Load and cache the business process, business function, and authority purpose/type code tables | Any read of a code object, collection, or cached code map | IDataPortalInfo only |
Code business objects, collections, and cached enum-keyed code maps | None catalogued* | CL_CLAIM_AUTH_PURPOSE_CODE, CL_CLAIM_AUTH_TYPE_CODE, CL_CLAIM_BUS_FUNCTION_CODE, CL_CLAIM_BUS_PROCESS_CODE | SQL-006, SQL-007, SQL-008, SQL-009, SQL-010, SQL-011, SQL-012, SQL-013 |
Process flow diagram¶
The following diagram shows how the six operations relate: an employee's authority aggregate is initialized from reference codes and limit collections, the caller edits and validates the limits (which lean on the amount/approval-type checks), and a save cascades the grant authority and both limit collections together.
flowchart TD
Start([Caller requests authority<br>for employee and business process]) --> Lookups[Authority reference<br>code lookups]
Lookups --> Init[Claim authority initialization]
Init --> GrantMissing{Grant authority exists?}
GrantMissing -->|No| DefaultGrant[Seed default:<br>CanNotAuthorizeOthers]
GrantMissing -->|Yes| LoadLimits
DefaultGrant --> LoadLimits[Load business function<br>and category change limits]
LoadLimits --> Edit[Caller edits grant authority<br>and/or limit rows]
Edit --> BizEdit[Business function<br>limit maintenance]
Edit --> CatEdit[Category change<br>limit maintenance]
BizEdit --> Checks[Authorization amount and<br>approval-type checks]
CatEdit --> Checks
Checks --> Valid{IsValid?}
Valid -->|No| Errors([Broken rules returned;<br>changes retained in memory])
Valid -->|Yes| Save[Claim authority save]
Save --> Rows{RowsAffected = 1<br>on every dirty child?}
Rows -->|Yes| Done([Changes persisted])
Rows -->|No| Contention([DB contention or insert<br>error added per child])
Database interactions¶
The following table summarizes which operations read from or write to the database. Per-step SQL and table citations live in each operation's detail page under operations/.
| Operation | SQL | Tables | Type |
|---|---|---|---|
| Claim authority initialization | SQL-014, SQL-015, SQL-017 | CL_CLAIM_EMP_AUTH_TYPE, CL_CLAIM_EMP_BUS_FUNC_LIMIT, CL_CLAIM_EMP_CAT_CHANGE_LIMIT | Read |
| Claim authority save | SQL-003, SQL-018, SQL-021 | CL_CLAIM_EMP_AUTH_TYPE | Write |
| Business function limit maintenance | SQL-001, SQL-004, SQL-015, SQL-019, SQL-022 | CL_CLAIM_EMP_BUS_FUNC_LIMIT | Read / Write |
| Category change limit maintenance | SQL-002, SQL-005, SQL-016, SQL-017, SQL-020, SQL-023 | CL_CLAIM_EMP_CAT_CHANGE_LIMIT | Read / Write |
| Authorization amount and approval-type checks | None catalogued* | CL_CLAIM_EMP_BUS_FUNC_LIMIT, CL_CLAIM_EMP_CAT_CHANGE_LIMIT | Read (inline scalar, not catalogued) |
| Authority reference code lookups | SQL-006, SQL-007, SQL-008, SQL-009, SQL-010, SQL-011, SQL-012, SQL-013 | CL_CLAIM_AUTH_PURPOSE_CODE, CL_CLAIM_AUTH_TYPE_CODE, CL_CLAIM_BUS_FUNCTION_CODE, CL_CLAIM_BUS_PROCESS_CODE | Read |
Failure and edge-case behavior¶
- Every persisting operation adds a DB-contention or insert-failure error message on a rows-affected value other than
1, instead of throwing; callers must inspectErrorCountafterSave(). Detailed per-operation behavior is documented on each operation page. IsSecurityOverridecan bypass the amount and approval-type ceilings enforced by Authorization amount and approval-type checks, but the property setter forces it back toFalsewhenever the environment is production (BR-012).- A missing grant-authority row is not treated as an error during initialization — the object is seeded in-memory with the most restrictive authority level rather than failing.
- The inline scalar queries behind the amount and approval-type checks are not individually cataloged as
SQL-*documents in this library's SQL catalog, unlike the CRUD statements used by the other five operations.* - Authorization decisions depend on live Oracle code-table and limit-row data; changes to that data change authorization outcomes without any code change in this library.
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.
Sources¶
Business\SAIF.Business.Claim.Authority\clsClaimAuthority.vbBusiness\SAIF.Business.Claim.Authority\clsClaimEmpAuthType.vbBusiness\SAIF.Business.Claim.Authority\clsClaimEmpBusFuncLimit.vbBusiness\SAIF.Business.Claim.Authority\clsClaimEmpBusFuncLimitCollection.vbBusiness\SAIF.Business.Claim.Authority\clsClaimEmpCatChangeLimit.vbBusiness\SAIF.Business.Claim.Authority\clsClaimEmpCatChangeLimitCollection.vbBusiness\SAIF.Business.Claim.Authority\clsClaimAuthPurposeCode.vbBusiness\SAIF.Business.Claim.Authority\clsClaimAuthPurposeCodeCollection.vbBusiness\SAIF.Business.Claim.Authority\clsClaimAuthTypeCode.vbBusiness\SAIF.Business.Claim.Authority\clsClaimAuthTypeCodeCollection.vbBusiness\SAIF.Business.Claim.Authority\clsClaimBusFunctionCode.vbBusiness\SAIF.Business.Claim.Authority\clsClaimBusFunctionCodeCollection.vbBusiness\SAIF.Business.Claim.Authority\clsClaimBusProcessCode.vbBusiness\SAIF.Business.Claim.Authority\clsClaimBusProcessCodeCollection.vbBusiness\SAIF.Business.Claim.Authority\mdlClaimAuthority.vb