Purge completed tasks¶
This operation deletes previously completed/deleted tasks older than a caller-supplied retention window, by calling PK82036_Task.Task_Purge.
| Field | Value |
|---|---|
| Operation ID | OP-7 |
| Trigger | Batch/maintenance caller |
| Inputs | Task source code, task category code, retention days |
| Outputs | Count of purged rows |
| Primary components | clsTaskCollection.PurgeTasks (Shared) |
| Entry point | SAIF.Business.Tasks/clsTaskCollection.vb |
Steps¶
- Create a portal request and data request (
DataRequest.ID = "IMG0001_Purge_Task"),CommandType = StoredProcedure,RequestType = Scalar, statementPK82036_Task.Task_Purge(SQL-015, TASK). - Add input parameters
intasksourcecode,intaskcategorycode,inkeepdaysand output parameteroutdelrows(DbType.String, length 15).Origin: The
Task_Purgeprocedure body resides in the Oracle database and was not retrieved in this analysis pass — the actual retention/purge semantics are unverified.** - Call
inDataPortalInfo.ProcessPortalRequest. - Return
CInt(outdelrows)— the number of deleted rows.
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start([PurgeTasks called]) --> S1["Build scalar request:<br>Task_Purge"]
S1 --> S2["Add source/category/keepdays<br>params + outdelrows output"]
S2 --> S3["ProcessPortalRequest<br>executes"]
S3 --> EndOk([Return CInt of outdelrows])
Failure and edge-case behavior¶
inkeepdaysis passed as a string parameter rather than a numeric type*.- No error handling beyond the framework's default request execution is present in this method — failures are the framework's responsibility**.
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/clsTaskCollection.vb