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¶
- Retrieve the active award for the claim (
AWARD_STATUS_CODE = 'A') (SQL-031, CL_AWARD). AfterRetrieve: whenHasActiveAwardis true, callRetrieveBenefitPayment()(SQL-032, CL_BENEFIT_PAYMENT) and mark the object dirty (MarkDirty()).- Caller sets the award status to
'P'and saves. - Execute
UpdateSQL, settingAWARD_STATUS_CODE = 'P'(SQL-048, CL_AWARD). - Note: this update has no
UPDATE_NUMpredicate in its WHERE clause, so it is not protected by the optimistic-concurrency check used elsewhere in this library.* - On failure: add error "The Award was NOT succesfully updated to Pending" (BR-011).
AfterUpdate: callProcessBenefitPayment(), which executesUpdateBenefitPaymentSQLto setBENEFIT_STATUS_CODE = '0'(In Progress) on the associated benefit payment (SQL-049, CL_BENEFIT_PAYMENT).- 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_NUMoptimistic-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.**
Related documentation¶
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