Establish the policy data layer¶
This operation prepares the application-layer database context used by all subsequent policy retrievals.
| Field | Value |
|---|---|
| Operation ID | OP-01 |
| Trigger | Framework initialization of PolicyAppManager |
| Inputs | Security principal and host-supplied portal configuration |
| Outputs | Initialized Policy portal, fixed GEN database identity, and reusable DPI |
| Primary components | PolicyAppManager.OnInitialize, PolicyAppManager.OnCreateDataLayer |
| Entry point | Application\SAIF.Application.Policy\PolicyAppManager.vb |
Steps¶
- Set
DataLayer.DBUser = "GEN"for the policy portal (BR-101). - Attempt to create the Oracle portal named
Policy. - If portal creation fails, call
MarkContextNotSet(), callMarkNoAccess(), and raiseApplicationException("Unable to Establish Database Connection")(BR-102). - Expose the resulting portal through
DPIso downstream retrieval and transaction logic can reuse it.
Process flow¶
The following diagram visualizes the initialization flow.
flowchart TD
Start([Manager initialization]) --> SetUser[Set DB user to GEN]
SetUser --> Create[Create Oracle portal Policy]
Create --> Ok{Created?}
Ok -->|Yes| Done([Expose DPI])
Ok -->|No| Fail([Mark no access and raise])
Failure and edge-case behavior¶
- Missing or invalid portal configuration fails closed through BR-102.
- The fixed
GENidentity applies to every caller of this library (BR-101).
Related documentation¶
Sources¶
Application\SAIF.Application.Policy\PolicyAppManager.vb