SAIF.Services.ClaimInfoApi.Core operations and processes¶
This page is the operation catalog and cross-operation hub for SAIF.Services.ClaimInfoApi.Core. Each operation's detailed, step-by-step logic lives in its own page under operations/. This library performs no database access, so no operation carries a Tables or SQL citation.
Operation catalog¶
| Operation | Intent | Trigger | Inputs | Outputs | Rules |
|---|---|---|---|---|---|
| Calculate notifications for a model | Evaluate every rule in a matrix against a model and collect the non-null results | Caller invokes NotificationRuleEngine.CalculateNotifications<T> |
model (T), matrix (NotificationMatrix) |
NotificationResult[], one per distinct rule position |
CIA-BR-001, CIA-BR-007 |
| Evaluate one rule | Resolve a single rule's type and produce its output value, or null | Step 3 of OP-CIA-01, or recursively for an out-property child rule | rule (NotificationRule), model (T) |
A string value, or null | CIA-BR-002, CIA-BR-003, CIA-BR-004, CIA-BR-005, CIA-BR-006 |
| Compile a rule into a delegate | Build a LINQ expression tree from rule metadata and compile it into a runnable delegate | A caller request, or OP-CIA-02 | r (NotificationRule) |
A compiled Func<T,TResult> |
CIA-BR-008, CIA-BR-009, CIA-BR-010, CIA-BR-011, CIA-BR-012 |
| Build rule definitions | Construct a NotificationRule through one of its four static factory methods |
A caller request | Position, type name, member/method name, target value | A NotificationRule instance |
CIA-BR-001, CIA-BR-009, CIA-BR-010, CIA-BR-013 |
Process flow diagram¶
The following diagram visualizes the primary calculate-and-compile flow across the four operations.
flowchart TD
Start(["Caller invokes<br>CalculateNotifications"]) --> Loop["OP-CIA-01: iterate<br>matrix.Rules"]
Loop --> Eval["OP-CIA-02: evaluate<br>one rule"]
Eval --> TypeCheck{"Resolved type?"}
TypeCheck -->|int / string| Compile["OP-CIA-03: compile<br>and invoke delegate"]
TypeCheck -->|bool, true, OutProperty set| Child["Recurse into child<br>PropertyRule (OP-CIA-02)"]
TypeCheck -->|bool, false| Skip([No notification])
Compile --> Collect["Add non-null value<br>keyed by Position"]
Child --> Collect
Collect --> Loop
Loop -->|all rules done| Done([Return NotificationResult array])
Failure and edge-case behavior¶
- If
matrix.Rulesis null, OP-CIA-01 throws aNullReferenceException; there is no null guard. - An unresolvable
TypeNamein OP-CIA-02 falls through to the string evaluation branch rather than failing. - OP-CIA-03 has no validation or
try/catch: an unknown member name can produce aNullReferenceException,ArgumentNullException, orArgumentException; a non-convertibleTargetValueproducesInvalidCastExceptionorFormatExceptionfromConvert.ChangeType; a delegate type mismatch producesArgumentException. All propagate to the caller. - Every call to OP-CIA-03 recompiles the expression tree from scratch; no compiled delegate is cached, which is a known performance characteristic rather than a mitigated design choice — see Architecture.
- Result array order from OP-CIA-01 follows
Dictionary<string, NotificationResult>enumeration order, which is not formally guaranteed*.
Note: Statements marked with
*were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts.
Related documentation¶
Sources¶
Services/SAIF.Services.ClaimInfoApi.Core/NotificationMatrix.csServices/SAIF.Services.ClaimInfoApi.Core/NotificationRule.csServices/SAIF.Services.ClaimInfoApi.Core/NotificationRuleEngine.csServices/SAIF.Services.ClaimInfoApi.Core/NotificationRuleResult.cs