Set claim context¶
This operation establishes a claim-scoped session for a ClaimAppManager subclass. The caller supplies either a claim number or a claim ID; the manager creates a ClaimContext, loads the corresponding claim data, evaluates the caller's security access to that claim, and finally invokes the subclass-specific retrieval logic.
| Field | Value |
|---|---|
| Operation ID | OP-AC-01 |
| Trigger | Caller calls SetClaimContext(inClaimNumber As String) or SetClaimContext(inClaimID As Decimal) |
| Inputs | Claim number (String) or claim ID (Decimal) |
| Outputs | Active ClaimContext, populated clsClaimData, updated ClaimSecurity snapshot, subclass-specific retrieved state, and a caller-facing Message |
| Primary components | ClaimAppManager.SetClaimContext, ClaimAppManager.ChangeContext, ClaimContext, ClaimSecurity, clsClaimData |
| Entry point | Application\SAIF.Application.Claim\ClaimAppManager.vb |
Steps¶
SetClaimContext(inClaimNumber As String)checksinClaimNumber.Trim.Length > 0.- If true: creates
New ClaimContext(inClaimNumber)and callsChangeContext()(step 3). - If false (blank input): clears
m_ClaimData, callsMarkContextNotSet(), and setsMessage = ClaimAppConstants.PLEASEENTERCLAIM(BR-006).ChangeContext()is not invoked on this path. SetClaimContext(inClaimID As Decimal)checksinClaimID > 0.- If true: creates
New ClaimContext(inClaimID, 0)and callsChangeContext()(step 3). - If false (zero or negative): clears
m_ClaimData, callsMarkContextNotSet(), and setsMessage = ClaimAppConstants.PLEASEENTERCLAIM(BR-006).ChangeContext()is not invoked on this path. ChangeContext()runs the context-change pipeline in a fixed order:OnContextChanged(), thenOnCheckSecurity(), thenOnRetrieve().OnContextChanged()loads claim data for the new context:-
Calls
GetClaimData(), which readsContext.ClaimID; if it is greater than zero, it retrieves the claim throughclsClaimData.GetData(DPI, Context.ClaimID), otherwise throughclsClaimData.GetData(DPI, Context.ClaimNumber).Origin: Claim retrieval by ID or claim number is implemented by
clsClaimData.GetDatainSAIF.Business.View.Claim, executed on behalf of this operation. That library is documented in the previous format, so no per-operation page exists; see Retrieve claim summary data in theSAIF.Business.View.Claimdocumentation set. - SetsMessage = ClaimAppConstants.CLAIMNOTFOUNDand callsMarkContextNotSet()by default. - Ifm_ClaimData.IsValidis true: clearsMessageand callsMarkContextSet()instead. - On failure (claim not found or invalid): the context remains not-set andMessageretainsCLAIMNOTFOUND. 5.OnCheckSecurity()evaluates the caller's access to the loaded claim: - CallsClaimSecurity.CheckClaim(ClaimData), which evaluates conflict access (BR-001), exposure access (BR-002), hostile-worker/secure-claim access (BR-003), and health-issue access (BR-004) against the claim's flags. - CallsMarkViewOnly()unconditionally as the default post-security role.Origin:
MarkViewOnly()sets the single effective application security role defined byAppManagerBaseinSAIF.Application. That library is documented in the previous format, so no per-operation page exists; see Security role assignment in theSAIF.Applicationdocumentation set. - IfClaimSecurity.ConflictAccessis false: callsCheckForSecurityOverride(). - Sub-step:CheckForSecurityOverride()delegates toClaimServices.HasOverrideAcess(DPI, ClaimData.ClaimID, SecurityPrincipal.UserName.ToString).Origin: The security-override lookup is implemented by
ClaimServices.HasOverrideAcessinSAIF.Business, backed by an override-security table read. That library is documented in the previous format, so no per-operation page exists; see Claim authorization and visibility checks (step 4, SQL-014) in theSAIF.Businessdocumentation set. - If the override check also returns false: callsMarkNoAccess()and setsMessage = ConfidentialAccessDeniedMessage(BR-001). - If the override check returns true: no-access is not applied; the caller keeps the view-only role assigned in the previous bullet. 6.OnRetrieve()is abstract inClaimAppManagerand executes only in the concrete subclass, which loads its own application-specific state for the now-validated claim context. This library does not implementOnRetrieve()itself.*
Process flow¶
The following diagram visualizes the claim-context-entry control flow.
flowchart TD
Start([Caller invokes SetClaimContext]) --> Valid{Claim number or ID valid?}
Valid -->|No| Blocked([Context not set;<br>PLEASEENTERCLAIM message])
Valid -->|Yes| NewCtx[Create ClaimContext]
NewCtx --> ChangeContext[ChangeContext]
ChangeContext --> GetData[GetClaimData via<br>clsClaimData.GetData]
GetData --> IsValid{ClaimData.IsValid?}
IsValid -->|No| NotFound([Context not set;<br>CLAIMNOTFOUND message])
IsValid -->|Yes| ContextSet[MarkContextSet]
ContextSet --> CheckSecurity[CheckClaim: conflict,<br>exposure, hostile, health-issue]
CheckSecurity --> ViewOnly[MarkViewOnly]
ViewOnly --> Conflict{ConflictAccess false?}
Conflict -->|No| Retrieve[OnRetrieve in subclass]
Conflict -->|Yes| Override{Security override granted?}
Override -->|Yes| Retrieve
Override -->|No| NoAccess([MarkNoAccess;<br>confidential-access message])
Failure and edge-case behavior¶
- A blank claim number or a claim ID that is zero or negative leaves the manager out of context and sets
Message = PLEASEENTERCLAIM;ChangeContext()never runs for these inputs (BR-006). - A claim number or ID that resolves to no row (or an invalid
clsClaimData) leaves the context marked not-set withMessage = CLAIMNOTFOUND, andOnCheckSecurity()/OnRetrieve()still execute against the unpopulated claim data sinceChangeContext()does not short-circuit afterOnContextChanged().* - A conflict claim without conflict access and without an override is marked
NoAccessand returnsConfidentialAccessDeniedMessage, which names the responsible adjuster and phone number when available, or the genericERRORCONFIDENTIALCLAIMmessage otherwise. OnRetrieve()has no base implementation; if a subclass does not override it, no application-specific data is loaded even though the context and security state are otherwise valid.*
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¶
Application\SAIF.Application.Claim\ClaimAppManager.vbApplication\SAIF.Application.Claim\ClaimContext.vbApplication\SAIF.Application.Claim\ClaimSecurity.vbApplication\SAIF.Application.Claim\ClaimAppConstants.vb