Initialize application manager¶
This operation describes the abstract initialization sequence every concrete AppManagerBase subclass follows: storing the security principal, then delegating initialization and data-layer setup to subclass-implemented hooks.
| Field | Value |
|---|---|
| Operation ID | OP-APP-001 |
| Trigger | Caller (concrete subclass constructor/factory, outside this library) invokes the protected constructor, then calls Initialize() |
| Inputs | clsSecurityPrincipal |
| Outputs | Initialized instance with SecurityPrincipal set and DataLayer populated by the subclass |
| Primary components | AppManagerBase.New, AppManagerBase.Initialize |
| Entry point | SAIF.Application\AppManagerBase.vb |
Steps¶
- Caller invokes the protected constructor
New(inSecurityPrincipal As clsSecurityPrincipal), which stores the supplied principal inSecurityPrincipal. No business rule is enforced at this step and no SQL/table access occurs. - Caller invokes
Initialize(), which callsOnInitialize()(abstract — implemented by the concrete subclass) followed byOnCreateDataLayer()(abstract — implemented by the concrete subclass). No business rule is enforced byAppManagerBaseitself at this step (BR-APP-004 requires every subclass to supply these implementations). - This step delegates to subclass-implemented hooks whose bodies are not present in this library — callee identity (library, class, operation) cannot be determined from this library's scope.**
OnCreateDataLayer()(subclass responsibility) is expected to populateDataLayer(anApplicationDataAccessinstance, lazily created on first access) with one or more named data portals via Register a database connection portal, or viaAppManagerBase.InjectDPI(key, dpi)to inject a pre-builtIDataPortalInfodirectly.- Every concrete subclass must also implement
OnContextChanged,OnCheckSecurity,OnTransactionStart,OnTransactionStop,OnRetrieve,OnWrite,OnValidContext,Retrieve, andWrite(BR-APP-004); the VB.NET compiler prevents instantiation of any subclass that omits one of these members. - Inherited edit-session and rule-evaluation machinery from
clsBusinessBase(BeginEdit/ApplyEdit, rule evaluation, save dispatch) is available on the instance but no direct evidence inAppManagerBase.vbshows it being invoked by this library's own code.*
Origin: The inherited edit-session/rule-evaluation/save machinery referenced above is implemented in
clsBusinessBase(SAIF.Framework.Core) and made available to everyAppManagerBaseinstance through inheritance; no local operation document exists for it because it originates from a dependency framework library, not an in-repo project reference.
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start([Concrete subclass constructor]) --> S1[Store SecurityPrincipal]
S1 --> S2[Call Initialize]
S2 --> S3[OnInitialize - subclass hook]
S3 --> S4[OnCreateDataLayer - subclass hook]
S4 --> D{Portal registration needed?}
D -->|Yes| S5[Register data connection portal]
D -->|No / InjectDPI used| EndOk([Instance ready])
S5 --> EndOk
Failure and edge-case behavior¶
- If a concrete subclass omits any
MustOverridemember, the VB.NET compiler prevents instantiation entirely — this is a compile-time, not runtime, failure mode.
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\AppManagerBase.vb