Skip to content

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

  1. Set DataLayer.DBUser = "GEN" for the policy portal (BR-101).
  2. Attempt to create the Oracle portal named Policy.
  3. If portal creation fails, call MarkContextNotSet(), call MarkNoAccess(), and raise ApplicationException("Unable to Establish Database Connection") (BR-102).
  4. Expose the resulting portal through DPI so 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 GEN identity applies to every caller of this library (BR-101).

Sources

  • Application\SAIF.Application.Policy\PolicyAppManager.vb