Establish claim context and load a claim¶
This operation is the entry point every claim-oriented manager uses to bind to a claim: it validates the supplied key, replaces the immutable context object, and runs the fixed retrieve/security/screen-data pipeline.
| Field | Value |
|---|---|
| Operation ID | OP-CLM-1 |
| Trigger | A UI screen or derived manager calls SetClaimContext or SetWorkerContext |
| Inputs | Claim number, claim id, or worker id |
| Outputs | Populated ClaimData, an access classification, and a user Message |
| Primary components | ClaimAppManager.SetClaimContext, ClaimAppManager.SetWorkerContext, ClaimAppManager.ChangeContext |
| Entry point | SAIF.Application.Claim/ClaimAppManager.vb |
Steps¶
- Validate the supplied key: a claim number must be non-blank after trim; a claim id or worker id must be greater than zero (BR-CLM-001).
- On failure: clear
m_ClaimData, callMarkContextNotSet(), setMessage = ClaimAppConstants.PLEASEENTERCLAIM, and return without any retrieval.SetWorkerContextreturns silently on an invalid worker id without setting a message. - Replace the context object: construct a new
ClaimContext(by claim number, claim id, or worker id), which setsContextSet = True(BR-CLM-002). ChangeContext()runs the fixed pipeline:OnContextChanged()→OnCheckSecurity()→OnRetrieve()(BR-CLM-003).OnContextChanged()callsGetClaimData(): whenContext.ContextSet, retrieve the claim by claim id ifClaimID > 0, otherwise by claim number; thenMarkContextSet().- Delegated logic: retrieval of the claim row is implemented in
clsClaimData.GetData(DPI, key)(SAIF.BOF.Business.View.Claim); SQL and tables were not traced in this pass.**Origin: The claim row retrieval is implemented in
SAIF.BOF.Business.View.Claim(clsClaimData) and executed on behalf of this operation; its SQL was not traced in this analysis pass. - Evaluate the retrieval outcome: set
Message = ClaimAppConstants.CLAIMNOTFOUNDandMarkContextNotSet(); then, ifm_ClaimData.IsValid, clear the message andMarkContextSet()(BR-CLM-004). - If the context is worker-only (
WorkerIDset,ClaimID = 0, blank claim number): step 4 runs with an empty claim number, soClaimDatais not expected to be valid.* OnCheckSecurity()runs — see Evaluate claim access.OnRetrieve()— abstract in this library; the derived manager loads its screen-specific data. Not traced here.
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start([Set*Context called]) --> Valid{Key valid?}
Valid -->|No| Blocked(["Message: enter valid claim<br>number, no retrieval"])
Valid -->|Yes| NewCtx[Construct new ClaimContext]
NewCtx --> Pipeline["ChangeContext:<br>OnContextChanged"]
Pipeline --> LoadClaim["GetClaimData via<br>clsClaimData"]
LoadClaim --> Found{ClaimData.IsValid?}
Found -->|No| NotFound(["Message: claim not found,<br>MarkContextNotSet"])
Found -->|Yes| SetOk[MarkContextSet]
SetOk --> CheckSec[OnCheckSecurity]
CheckSec --> OnRetrieve["OnRetrieve: derived screen<br>load"]
Failure and edge-case behavior¶
- An invalid key short-circuits at step 1; no exception is thrown for a missing claim.
- If
ClaimDataisNothing(context never set),OnCheckSecuritywill dereference it — reachability in production is unknown.**
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.
Sources¶
SAIF.Application.Claim/ClaimAppManager.vbSAIF.Application.Claim/ClaimContext.vbSAIF.Application.Claim/ClaimAppConstants.vb