Audit note concurrency check¶
Verify that an audit note can be saved without an optimistic-concurrency conflict.
| Field | Value |
|---|---|
| Operation ID | OP-SD-11 |
| Trigger | Caller attempts to save an audit note. |
| Inputs | Note id, update number |
| Outputs | bool |
| Primary components | AuditNoteQueryProvider.IsAuditNoteNoContention |
| Entry point | Data/SAIF.Data/Queries/Claims/AuditNoteQueryProvider.cs |
Steps¶
- If
noteId == 0, return true (new note). Otherwise return true only when a note with the sameIdandUpdateNumberexists (SD-BR-033, SQL-004, SQL-005, SQL-006, SQL-007, SQL-008, SQL-009, SQL-010, SQL-011, SQL-012). Data:CbpNote(CBP_NOTE).
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start([Caller attempts to save an audit note.]) --> S1["`AuditNoteQueryProvider.IsAuditNoteNoContention`"]
S1 --> S2{"Rules satisfied?"}
S2 -->|Yes| EndOk([Result returned])
S2 -->|No| EndErr([Exception / empty result])
Failure and edge-case behavior¶
- Stale
UpdateNumber: returns false, signaling a concurrency conflict to the caller.
Related documentation¶
Sources¶
Data/SAIF.Data/Queries/Claims/AuditNoteQueryProvider.csData/SAIF.Data/Queries/Claims/AuditNoteQueryProvider.cs:19Data/SAIF.Data/Queries/Claims/AuditNoteQueryProvider.cs:25Data/SAIF.Data/Queries/Claims/AuditNoteQueryProvider.cs:32