Skip to content

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

  1. Build a NonQuery StoredProcedure request on pk82036_task.task_delete (DataRequest.ID = "DELETE") (SQL-014, TASK).
  2. Set UpdateUser from DPI.UserID.
  3. Pass parameters TaskSeqNum, UpdateSeqNum (optimistic concurrency, BR-013), UpdateUser, and RowsAffected (ReturnValue).

    Origin: The task_delete procedure body resides in the Oracle database and was not retrieved in this analysis pass; its soft-delete semantics are inferred, not confirmed.**

  4. Framework executes the request against the DPI.
  5. After execution:
  6. RowsAffected <> 1 → AddErrorMessage("DeleteError", clsConstants.Messages.DBContentionError) (BR-012).
  7. 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 UpdateSeqNum yields RowsAffected = 0, surfaced as DBContentionError (BR-012, BR-013).
  • The DELETE_FLAG column and the ShowCompleted search filter indicate this is logically a "completed" soft-delete handled inside the stored procedure, not a physical row delete*.

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