Initialize claim data portal¶
This operation prepares a ClaimAppManager instance for use: it sets the database user context, seeds a default prompt message, and provisions the Oracle data portal the manager will use for all subsequent claim retrieval and save operations. It also documents the lazily-created imaging API client available on the manager.
| Field | Value |
|---|---|
| Operation ID | OP-AC-06 |
| Trigger | The AppManagerBase initialization sequence invokes OnInitialize() and OnCreateDataLayer() as part of manager construction |
| Inputs | Security principal supplied to the manager's constructor; environment configuration (imagingapiurl) |
| Outputs | DataLayer.DBUser set to "CLM"; default Message; provisioned ClaimDPI Oracle portal; lazily-created ImagingClient on first access |
| Primary components | ClaimAppManager.OnInitialize, ClaimAppManager.OnCreateDataLayer, ClaimAppManager.ClaimImageApiClient, ApplicationDataAccess, ImagingClient |
| Entry point | Application\SAIF.Application.Claim\ClaimAppManager.vb |
Steps¶
OnInitialize()setsDataLayer.DBUser = "CLM"andMessage = ClaimAppConstants.PLEASEENTERCLAIMas the manager's starting prompt before any context has been set.
Origin:
OnInitialize()overrides the initialization hook defined byAppManagerBaseinSAIF.Application. That library is documented in the previous format, so no per-operation page exists; see Application context initialization in theSAIF.Applicationdocumentation set. 2.OnCreateDataLayer()attempts to provision the claim data portal: - CallsDataLayer.CreateOraclePortal(ClaimAppConstants.DPIClaimKey)(portal key"ClaimDPI"). - Sub-step:CreateOraclePortalregisters a keyedIDataPortalInfoentry throughApplicationDataAccess's portal-registration logic.
> **Origin**: Portal registration is implemented by `ApplicationDataAccess` in `SAIF.Application`. That library is documented in the previous format, so no per-operation page exists; see [Multi-database portal registration](../../saif-application/operations/multi-database-portal-registration.md) in the `SAIF.Application` documentation set.
- On failure (
Catch ex As Exception): callsMarkContextNotSet(), callsMarkNoAccess(), and throws a newApplicationException("Unable to Establish Database Connection", ex), wrapping the original exception. ClaimImageApiClientis a read-only property, not part of theOnInitialize/OnCreateDataLayersequence itself: on first access, if the private backing field isNothing, it createsNew ImagingClient(EnvironmentService.GetConfigSetting("imagingapiurl"))and caches it for the life of the manager instance.- If
imagingapiurlis not configured in the environment service,ImagingClient's construction behavior with a missing/empty URL is not visible in this library's source.**
Process flow¶
The following diagram visualizes portal provisioning and the failure path.
flowchart TD
Start([Manager construction begins]) --> Init[OnInitialize:<br>DBUser = CLM,<br>Message = PLEASEENTERCLAIM]
Init --> CreatePortal[OnCreateDataLayer:<br>CreateOraclePortal ClaimDPI]
CreatePortal --> Result{Portal created?}
Result -->|Yes| Ready([Manager ready for<br>context and retrieval])
Result -->|No| Fail[MarkContextNotSet;<br>MarkNoAccess]
Fail --> Throw([Throw ApplicationException:<br>Unable to Establish Database Connection])
Ready --> Imaging{ClaimImageApiClient<br>accessed?}
Imaging -->|Yes, first access| CreateImaging[Create ImagingClient<br>from imagingapiurl config]
Imaging -->|No| Skip([Imaging client not created])
Failure and edge-case behavior¶
- A failure to create the Oracle portal marks the manager out of context and denies access before throwing
ApplicationException, so callers that catch the exception should also expectNoAccess/not-set state on the manager. - The wrapped
ApplicationExceptionmessage ("Unable to Establish Database Connection") is generic; the original exception is preserved as the inner exception for diagnostic purposes. ClaimImageApiClientis created lazily and only once per manager instance; ifimagingapiurlis missing or invalid, the failure surfaces only when a caller first accessesClaimImageApiClient, not duringOnInitialize()/OnCreateDataLayer().*
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¶
Application\SAIF.Application.Claim\ClaimAppManager.vbApplication\SAIF.Application.Claim\ClaimAppConstants.vb