Delete (complete) a task¶
This operation logically completes/deletes a task by calling pk82036_task.task_delete, again protected by the UPDATE_SEQ_NUM optimistic-concurrency token.
| Field | Value |
|---|---|
| Operation ID | OP-4 |
| Trigger | Application calls delete on a task |
| Inputs | Existing clsTask instance |
| Outputs | Updated TASK row (soft-delete)* |
| Primary components | clsTask.BeforeDelete, clsTask.AfterDelete |
| Entry point | SAIF.Business.Tasks/clsTask.vb |
Steps¶
- Build a
NonQueryStoredProcedurerequest onpk82036_task.task_delete(DataRequest.ID = "DELETE") (SQL-014, TASK). - Set
UpdateUserfromDPI.UserID. - Pass parameters
TaskSeqNum,UpdateSeqNum(optimistic concurrency, BR-013),UpdateUser, andRowsAffected(ReturnValue).Origin: The
task_deleteprocedure body resides in the Oracle database and was not retrieved in this analysis pass; its soft-delete semantics are inferred, not confirmed.** - Framework executes the request against the DPI.
- After execution:
RowsAffected <> 1→AddErrorMessage("DeleteError", clsConstants.Messages.DBContentionError)(BR-012).- Otherwise: remove the message.
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start([Delete called on task]) --> S1["BeforeDelete builds<br>task_delete request"]
S1 --> S2[Framework executes request]
S2 --> D{RowsAffected = 1?}
D -->|No| ErrEnd(["DeleteError:<br>DBContentionError"])
D -->|Yes| EndOk(["Message cleared — task<br>completed"])
Failure and edge-case behavior¶
- A stale
UpdateSeqNumyieldsRowsAffected = 0, surfaced asDBContentionError(BR-012, BR-013). - The
DELETE_FLAGcolumn and theShowCompletedsearch filter indicate this is logically a "completed" soft-delete handled inside the stored procedure, not a physical row delete*.
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.Tasks/clsTask.vb