Skip to content

NotificationService

Implements INotificationService, exposing the OnBase document notification rule matrix — which document type/subtype combinations trigger legal, CBP, EAIP, agency, credit/collections, LEGCOL, OSHA, PLUS, PWP, and underwriter alerts — along with each matrix entry's underlying evaluation rule. It depends only on IUnitOfWork for reading OnBaseNotificationRuleMatrix records.

Purpose

  • Returns every configured notification rule matrix entry, each paired with its evaluation rule.
  • Returns the notification rule matrix entries scoped to a specific document type (and optional subtype).

Context

  • Namespace: SAIF.Services.Notifications
  • Assembly/package: SAIF.Services (packaged inside the SAIF.SAIFCode.Core NuGet package)

Public members

Member Signature Purpose
NotificationService(...) public NotificationService(IUnitOfWork unitOfWork) Wires in the unit of work used for all rule-matrix queries.
GetNotificationMatrixRules() public NotificationRuleMatrix[] GetNotificationMatrixRules() Returns every OnBaseNotificationRuleMatrix row mapped to NotificationRuleMatrix contracts, each including its matrix flags and evaluation rule.
GetNotificationMatrixRules(docType, docSubtype) public NotificationRuleMatrix[] GetNotificationMatrixRules(string docType, string docSubtype = null) Returns the rule matrix entries whose document type matches docType (case-insensitively) and whose subtype matches docSubtype (or has no subtype when docSubtype is not supplied).

Behavioral notes

  • Document-type matching is case-insensitive; subtype matching requires an exact (case-insensitive) match when a subtype is supplied, or that the matrix entry has no subtype at all when one is not supplied.
  • Each returned NotificationRuleMatrix carries a full set of boolean alert flags (legal, CBP, EAIP, agency, credit/collections rep, LEGCOL, OSHA, PLUS, PWP, underwriter) alongside the parsed evaluation NotificationRule, so callers get both "what kind of alert" and "under what condition" in a single record.

Sources

  • Services/SAIF.Services/Notifications/NotificationService.cs