Skip to content

Set award to Pending

Moves an active award to Pending status and cascades the related benefit-payment rows to In Progress so downstream processing reflects the pending state.

Field Value
Operation ID award-pending
Trigger AfterRetrieve/AfterUpdate on clsSetAwardPaymentPending
Inputs ClaimID, AwardNum
Outputs Updated award and benefit-payment rows
Primary components clsSetAwardPaymentPending.Retrieve, .Update, .ProcessBenefitPayment, .HasActiveAward
Entry point SAIF.Business.Claim/clsSetAwardPaymentPending.vb

Steps

  1. Retrieve the active award for the claim (AWARD_STATUS_CODE = 'A') (SQL-031, CL_AWARD).
  2. AfterRetrieve: when HasActiveAward is true, call RetrieveBenefitPayment() (SQL-032, CL_BENEFIT_PAYMENT) and mark the object dirty (MarkDirty()).
  3. Caller sets the award status to 'P' and saves.
  4. Execute UpdateSQL, setting AWARD_STATUS_CODE = 'P' (SQL-048, CL_AWARD).
  5. Note: this update has no UPDATE_NUM predicate in its WHERE clause, so it is not protected by the optimistic-concurrency check used elsewhere in this library.*
  6. On failure: add error "The Award was NOT succesfully updated to Pending" (BR-011).
  7. AfterUpdate: call ProcessBenefitPayment(), which executes UpdateBenefitPaymentSQL to set BENEFIT_STATUS_CODE = '0' (In Progress) on the associated benefit payment (SQL-049, CL_BENEFIT_PAYMENT).
  8. On failure: add error "… NOT succesfully updated to In Progress." (BR-011).

Process flow

The following diagram visualizes this operation's control flow.

flowchart TD
    Start([Retrieve active award]) --> HasActive{HasActiveAward?}
    HasActive -->|Yes| RetrievePmt[Retrieve benefit payment<br>MarkDirty]
    HasActive -->|No| End1([No cascade])
    RetrievePmt --> Save["Caller sets status = 'P' and<br>saves"]
    Save --> UpdateAward[Update CL_AWARD<br>AWARD_STATUS_CODE = 'P']
    UpdateAward --> Success{Update succeeded?}
    Success -->|No| ErrAward(["Error: award not updated to<br>Pending"])
    Success -->|Yes| UpdatePayment[Update CL_BENEFIT_PAYMENT<br>BENEFIT_STATUS_CODE = '0']
    UpdatePayment --> Success2{Update succeeded?}
    Success2 -->|No| ErrPayment(["Error: payment not updated<br>to In Progress"])
    Success2 -->|Yes| Done(["Award Pending, payment In<br>Progress"])

Failure and edge-case behavior

  • The award update (SQL-048) is not protected by an UPDATE_NUM optimistic-concurrency predicate, unlike most other updates in this library.*
  • Failure at either the award-update or benefit-payment-update step surfaces a distinct error message but does not roll back the other step automatically.**

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

  • SAIF.Business.Claim/clsSetAwardPaymentPending.vb