Skip to content

NotificationMatrix

NotificationMatrix is the configuration DTO that a caller supplies to NotificationRuleEngine to select which set of rules apply to a given document. It groups a NotificationRule[] under a composite "{DocType}:{SubType}" key, and it is the sole way this library receives rule metadata — no code in this library constructs or populates it, so the source of a real matrix (for example an OnBase notification-matrix store) is not visible from this library**.

Purpose

  • Group the NotificationRule definitions that apply to one document type and subtype combination, so OP-CIA-01 can select and evaluate the correct rule set.
  • Expose a composite lookup key (Key) that combines DocType and SubType, used by callers to identify which matrix applies before invoking the engine*.
  • Carry two flags, AlertLegal and AlertCBP, that are defined on the type but never read by any compiled code in this library — see Architecture: Design constraints**.

Context

  • Namespace: SAIF.Services.ClaimInfoApi.Core
  • Assembly/package: SAIF.Services.ClaimInfoApi.Core.dll, packaged inside the SAIF.SAIFCode.Core NuGet package

Public members

Member Signature Purpose
DocType public string DocType { get; set; } Document type component of the composite lookup key used to select this matrix.
SubType public string SubType { get; set; } Document subtype component of the composite lookup key used to select this matrix.
AlertLegal public bool AlertLegal { get; set; } A flag carried on the matrix that no compiled code in this library reads; only the uncompiled ClaimDataForOnBaseRuleEngine.cs references it**.
AlertCBP public bool AlertCBP { get; set; } A flag carried on the matrix that no compiled code in this library reads; only the uncompiled ClaimDataForOnBaseRuleEngine.cs references it**.
Rules public NotificationRule[] Rules { get; set; } The ordered set of rules that NotificationRuleEngine.CalculateNotifications iterates and evaluates against the model.
Key public string Key { get; } Computed "{DocType}:{SubType}" composite identifier used to select the applicable matrix for a document*.

Behavioral notes

  • Key is computed on every access from the current DocType/SubType values; it is not cached or validated for uniqueness.
  • If Rules is null when passed to NotificationRuleEngine.CalculateNotifications<T>, that call throws a NullReferenceException; NotificationMatrix performs no null-guarding of its own.

Constraints and usage notes

  • NotificationMatrix has a public parameterless constructor and public settable properties, so any caller can construct and populate an instance directly; there are no factory methods or validation, unlike NotificationRule.
  • Because AlertLegal/AlertCBP are unused by the compiled engine, setting them on a matrix consumed by NotificationRuleEngine has no observable effect**.

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

  • Services/SAIF.Services.ClaimInfoApi.Core/NotificationMatrix.cs