Skip to content

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

  1. If noteId == 0, return true (new note). Otherwise return true only when a note with the same Id and UpdateNumber exists (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.

Sources

  • Data/SAIF.Data/Queries/Claims/AuditNoteQueryProvider.cs
  • Data/SAIF.Data/Queries/Claims/AuditNoteQueryProvider.cs:19
  • Data/SAIF.Data/Queries/Claims/AuditNoteQueryProvider.cs:25
  • Data/SAIF.Data/Queries/Claims/AuditNoteQueryProvider.cs:32