Skip to content

SAIF.Application operations and processes

This page is the operation catalog and cross-operation hub for SAIF.Application. The library implements seven reusable application-manager operations covering lifecycle initialization, context validity, role-based accessibility, multi-database portal registration, message aggregation, cached AD resource authorization, and service-response exception conversion. Each operation's detailed, step-by-step logic lives in its own page under operations/.

Operation catalog

Operation Intent Trigger Inputs Outputs Rules Tables SQL
Application context initialization Initialize an AppManagerBase subclass instance and prepare its lazily-created data-access layer A consuming implementation calls Initialize() on an AppManagerBase subclass clsSecurityPrincipal supplied to the constructor; subclass-specific state read by OnInitialize()/OnCreateDataLayer() Ready-to-use manager state; registered ApplicationDataAccess data layer None registered* — —
Security role assignment Set and expose the single effective application access role for a manager instance A subclass evaluates caller/application state and calls MarkUpdate(), MarkViewOnly(), or MarkNoAccess() Subclass security decision Updated SecurityRole, IsAccessible, IsUpdateable, IsViewOnly, IsRestricted values BR-001 — —
Context validity check Confirm whether a manager instance holds enough valid state to proceed with a retrieve or write Calling code reads the ValidContext property Current manager instance state (subclass-defined) Boolean context-validity result None registered* — —
Message accumulation Build user-facing message text without duplicate lines, and format message lists into a single delimited string A manager or helper method receives message text or a list of messages Individual messages, message arrays, or IEnumerable(Of String) collections Updated AppManagerBase.Message string; formatted MessageFormatting output string BR-002 — —
Multi-database portal registration Register keyed SQL Server or Oracle portal information for downstream business-object use The manager sets connection properties and calls CreateSQLServerPortal(key) or CreateOraclePortal(key) DBUser, Database, Server, BatchID; registration key Stored, keyed IDataPortalInfo entry available through DPI(key) BR-004, BR-005 — —
AD resource access check (cached) Evaluate and reuse authorization results for a named AD resource Caller invokes HasAccess(resourceName) or CheckAccess(resourceNames) Caller-supplied resource name or names; clsSecurityPrincipal set via SetPrincipal(...) Cached Boolean authorization outcome per resource name BR-003 — —
Exception-to-message conversion Convert an exception and its inner-exception chain into Environment-typed service-response messages Service-oriented code calls ServiceResponse.ProcessException(ex) The caught Exception instance EnvironmentalErrors entries in a ServiceResponse None registered* — —

Process flow diagram

The following diagram visualizes the primary application-manager lifecycle across the seven operations.

flowchart TD
    Start([Subclass constructs manager]) --> Init[Application context initialization]
    Init --> Portal[Multi-database portal registration]
    Init --> Valid[Context validity check]
    Valid --> Security[Security role assignment]
    Security --> Access[AD resource access check cached]
    Access --> Decide{Sufficient access<br>and valid context?}
    Decide -->|Yes| Execute[Retrieve or write through<br>downstream business objects]
    Decide -->|No| Messages[Message accumulation<br>reports blocking messages]
    Execute --> ErrorPath{Exception thrown?}
    ErrorPath -->|Yes| Convert[Exception-to-message conversion]
    ErrorPath -->|No| End([Return result / messages])
    Messages --> End
    Convert --> End

Failure and edge-case behavior

  • CheckAccess(...) iterates over caller-supplied resource names but discards its own aggregate result and does not expose an authorization outcome to callers — see AD resource access check (cached).
  • Portal creation depends on consuming code supplying valid connection settings before registration occurs, and CreateSQLServerPortal/CreateOraclePortal throw on a duplicate key rather than ignoring it — see Multi-database portal registration.
  • Message aggregation suppresses repeated text using two different duplicate-detection strategies (substring vs. exact match) depending on which entry point is used — see Message accumulation.
  • ServiceResponse.ProcessException(ex) never terminates for an exception with a non-Nothing InnerException, because its inner-exception loop reassigns from the original exception's inner exception instead of the current one — see Exception-to-message conversion.
  • AppManagerBase.OnInitialize(), OnCreateDataLayer(), and OnValidContext() are all MustOverride, so this library supplies no default initialization or validity behavior at all — every concrete rule lives in the consuming application's subclass.

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\AppManagerBase.vb
  • Application\SAIF.Application\ApplicationDataAccess.vb
  • Application\SAIF.Application\MessageFormatting.vb
  • Application\SAIF.Application\UserAccess.vb
  • Application\SAIF.Application\Service Based\ServiceResponse.vb
  • Application\SAIF.Application\Service Based\ServiceMessage.vb
  • Application\SAIF.Application\Service Based\ServiceEnums.vb