---
title: SAIF.Application operations and processes
summary: Operation catalog and cross-operation hub for the reusable application-manager operations implemented by SAIF.Application.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-07-30
library: SAIF.Application
reference_type: package
---

# 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](operations/application-context-initialization.md) | 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](operations/security-role-assignment.md) | 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](business-rules.md#br-001-single-effective-application-security-role) | — | — |
| [Context validity check](operations/context-validity-check.md) | 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](operations/message-accumulation.md) | 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](business-rules.md#br-002-duplicate-message-text-is-suppressed) | — | — |
| [Multi-database portal registration](operations/multi-database-portal-registration.md) | 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](business-rules.md#br-004-data-portal-keys-are-registered-case-insensitively-and-only-once), [BR-005](business-rules.md#br-005-batch-id-overrides-the-data-access-client-id-for-portal-environments) | — | — |
| [AD resource access check (cached)](operations/ad-resource-access-check-cached.md) | 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](business-rules.md#br-003-authorization-results-are-cached-per-resource-name) | — | — |
| [Exception-to-message conversion](operations/exception-to-message-conversion.md) | 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* | — | — |

<!--
  STRICT: The Operation name in each catalog row links to that operation's
  detail page at operations/<operation-slug>.md (never an on-page anchor). The
  step-by-step logic, per-step rule citations, and embedded dependency logic
  live in the per-operation document. This library has no database
  interactions, so the Tables and SQL columns are intentionally empty.
-->

## Process flow diagram

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

```mermaid
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)](operations/ad-resource-access-check-cached.md).
- 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](operations/multi-database-portal-registration.md).
- 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](operations/message-accumulation.md).
- `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](operations/exception-to-message-conversion.md).
- `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.

## Related documentation

- [Index](index.md)
- [Overview](overview.md)
- [Architecture](architecture.md)
- [Dependencies](dependencies.md)
- [Business rules](business-rules.md)
- [Security and authorization](security-authorization.md)
- [API reference](api/index.md)
- [Configuration](configuration.md)

> **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`
