Set claim context and retrieve¶
Public method on ClaimAppManager that establishes the current claim context and triggers retrieval and security enforcement.
| Field | Value |
|---|---|
| Operation ID | OP-CLM-001 |
| Trigger | Caller supplies inClaimNumber As String or inClaimID As Decimal. |
| Inputs | inClaimNumber As String or inClaimID As Decimal |
| Outputs | None (side effect — updates Context, ClaimData, Message, and security-derived state) |
| Primary components | ClaimAppManager.SetClaimContext |
| Entry point | SAIF.Application.Claim\ClaimAppManager.vb |
Steps¶
- Validate the input is non-trivial (string overload): checks
inClaimNumber.Trim.Length > 0and that it is not the literal menu-context label ("claim #") per BR-CLM-006. - On failure:
ClaimDatais cleared,MarkContextNotSet()is called, andMessage = ClaimAppConstants.PLEASEENTERCLAIMis shown. - If valid, construct a new
ClaimContext(New(inClaimNumber)orNew(inClaimID, 0)) and callChangeContext(). ChangeContext()callsOnContextChanged().OnContextChanged()setsMessage = ClaimAppConstants.CLAIMNOTFOUNDper BR-CLM-007, callsGetClaimData(), and if the resultingClaimData.IsValid, clearsMessageand callsMarkContextSet().GetClaimData()readsclsClaimData.GetData(DPI, Context.ClaimID)orclsClaimData.GetData(DPI, Context.ClaimNumber)depending on which context value is set — a Retrieve call into the externally-packagedSAIF.Businessclaim business object (SQL ID and table not traceable from this library; owned bySAIF.Business, out of scope)**.- Only if
ContextSetis true,ChangeContext()callsOnCheckSecurity(). - See Security enforcement, which enforces BR-CLM-001 through BR-CLM-005.
ChangeContext()then callsOnRetrieve()— implemented by the concrete subclass outside this library; retrieval behavior beyond this point is subclass-specific and not traceable from this library's source**.- Tech debt:
SetClaimContext(inClaimID As Decimal)(the decimal overload) only callsMarkContextSet()directly and does not callChangeContext()/OnCheckSecurity()/OnRetrieve()— an asymmetry versus the string overload per BR-CLM-006 that may be an intentional lightweight ID-only context set or an inconsistency**.
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start([SetClaimContext called]) --> Guard{Input valid?}
Guard -->|No| Invalid([ClaimData cleared<br>MarkContextNotSet<br>Message: PLEASEENTERCLAIM])
Guard -->|Yes| Change[ChangeContext]
Change --> OCC[OnContextChanged:<br>GetClaimData]
OCC --> Valid{ClaimData.IsValid?}
Valid -->|No| NotFound([Message: CLAIMNOTFOUND])
Valid -->|Yes| Set[MarkContextSet]
Set --> Security[OnCheckSecurity]
Security --> Retrieve[OnRetrieve<br>subclass-implemented]
Failure and edge-case behavior¶
- Blank/placeholder claim number: rejected, see BR-CLM-006.
- Claim not found after retrieval: reported, see BR-CLM-007.
- Decimal-overload asymmetry (
SetClaimContext(inClaimID)skipsChangeContext) — see step 5 above.
Related documentation¶
Note: Statements marked with
**could not be confirmed; treat as unknown until verified.
Sources¶
SAIF.Application.Claim\ClaimAppManager.vbSAIF.Application.Claim\ClaimAppConstants.vb