SAIF.Business.Tasks operations and processes¶
This page is the operation catalog and cross-operation hub for this library. Each operation's detailed, step-by-step logic lives in its own page under operations/.
Operation catalog¶
| Operation | Intent | Trigger | Inputs | Outputs | Rules | Tables | SQL |
|---|---|---|---|---|---|---|---|
| Retrieve a filtered task list | Return tasks matching caller-supplied search criteria | Application-layer request for a task list | IDataPortalInfo, populated Criteria |
Populated clsTaskCollection |
BR-016, BR-017, BR-018, BR-019, BR-020, BR-021, BR-022 | TASK | SQL-008 |
| Create/insert a task | Persist a new task row | Application creates a concrete task and calls Save() |
New clsTask instance |
Inserted TASK row, TaskSeqNum assigned |
BR-001, BR-010, BR-014, BR-015, BR-016 | TASK | SQL-001, SQL-005 |
| Update a task | Persist changes to an existing task | Application calls Save() on a modified task |
Modified clsTask instance |
Updated TASK row |
BR-011, BR-013, BR-016 | TASK | SQL-013 |
| Delete (complete) a task | Mark a task completed/deleted | Application calls delete on a task | Existing clsTask instance |
Updated TASK row (soft-delete)* |
BR-012, BR-013 | TASK | SQL-014 |
| Assign and normalize a task due date | Normalize a due date to a working day | Any assignment to TaskDate |
Candidate date, TaskDateModifier |
Normalized TaskDate, TaskDateModified flag |
BR-008, BR-009 | N/A | N/A |
| Retrieve a single task | Load one task by sequence number | Application requests a specific task | TaskSeqNum |
Populated clsTask instance |
N/A | TASK | SQL-002 |
| Purge completed tasks | Remove old completed tasks past retention | Batch/maintenance caller | Source code, category code, retention days | Count of purged rows | N/A | TASK | SQL-015 |
| Save a task collection | Persist pending edits across a task collection | Application calls Save() on a collection |
clsTaskCollection with pending edits |
Persisted inserts/updates/deletes | N/A | TASK | SQL-001, SQL-013, SQL-014 |
| Load a code table | Retrieve read-only code-table rows for translation/display | Application requests action/category/priority/source codes | Optional Code and/or TaskSourceCode filter |
Populated code object or collection | BR-023, BR-024, BR-025 | TASK_ACTION_CODE, TASK_CATEGORY_CODE, TASK_PRIORITY_CODE, TASK_SOURCE_CODE | SQL-003, SQL-004, SQL-006, SQL-007, SQL-009, SQL-010, SQL-011, SQL-012 |
| Copy a task to another user | Duplicate a task's core fields onto a new instance | Descendant CopyTo(inMailID) |
Source clsTask |
New iTask with copied fields and duplicated context |
N/A | N/A | N/A |
| Snapshot/restore task state | Capture and later restore a task's in-memory state | Framework edit/cancel lifecycle | clsTask instance |
TaskStore snapshot / restored fields |
N/A | N/A | N/A |
Process flow diagram¶
The following diagram visualizes the primary operational flow across operations.
flowchart TD
Start([Application request]) --> Decision{Operation type?}
Decision -->|Search| Retrieve[Retrieve filtered task list]
Decision -->|Save new| Create[Create/insert a task]
Decision -->|Save existing| Update[Update a task]
Decision -->|Complete| Delete[Delete/complete a task]
Create --> Rules{Rules pass?}
Rules -->|No| ErrEnd([Save blocked])
Rules -->|Yes| Insert[SQL-001 task_insert]
Update --> Rules
Rules -->|Yes, update path| UpdateSQL[SQL-013 task_update]
Delete --> DeleteSQL[SQL-014 task_delete]
Retrieve --> RetrieveSQL[SQL-008 dynamic SELECT]
Database interactions¶
The following table summarizes which operations read from or write to the database. Per-step SQL and table citations live in each operation's detail page under operations/.
| Operation | SQL | Tables | Type |
|---|---|---|---|
| Retrieve a filtered task list | SQL-008 | TASK | Read |
| Create/insert a task | SQL-001, SQL-005 | TASK, TASK_CATEGORY_CODE | Write / Read |
| Update a task | SQL-013 | TASK | Write |
| Delete (complete) a task | SQL-014 | TASK | Write |
| Retrieve a single task | SQL-002 | TASK | Read |
| Purge completed tasks | SQL-015 | TASK | Write |
| Load a code table | SQL-003, SQL-004, SQL-006, SQL-007, SQL-009, SQL-010, SQL-011, SQL-012 | TASK_ACTION_CODE, TASK_CATEGORY_CODE, TASK_PRIORITY_CODE, TASK_SOURCE_CODE | Read |
Failure and edge-case behavior¶
- Retrieving a task whose source system has no registered concrete task class throws
ApplicationException("<source description> Tasks are not yet supported!")(BR-022). - Insert/update/delete each verify
RowsAffected = 1; any other value raises an error message rather than an exception, leaving the object in an error state for the caller to inspect (BR-010, BR-011, BR-012). - A stale
UpdateSeqNum(optimistic concurrency conflict) causes zero rows affected on update/delete, surfacing as a contention error (BR-013). clsTaskCollection.Criteria.WhereClausealways returns an empty string because the internalFormatWhereClause()is never invoked byFormatRequest— likely dead/legacy code.*
Stored procedure operations¶
Operations implemented in Oracle stored procedures referenced by this library.
| Operation | Description | Source | Link |
|---|---|---|---|
| Create task | Inserts a new row into TASK with a sequence-assigned key, server-side audit stamps, an active ('N') delete flag, and zero-to-null normalisation of claim and policy references. Returns the affected row count. |
pk82036_task.task_insert |
Details |
| Retrieve task | Opens a REF CURSOR over a single TASK row selected by task_seq_num, projecting 25 columns under camel-cased aliases consumed by clsTask.Fill. |
pk82036_task.task_select |
Details |
| Update task | Updates the mutable attributes of an existing TASK row under an optimistic-concurrency check, advancing update_seq_num and re-stamping update_date / update_user. Source code and creator are not updatable. |
pk82036_task.task_update |
Details |
| Logically delete task | Marks a TASK row as deleted by setting delete_flag = 'Y' under an optimistic-concurrency check, preserving the row for history and later purge. |
pk82036_task.task_delete |
Details |
| Purge aged deleted tasks | Physically removes previously soft-deleted TASK rows for a given source and category whose last update is older than a caller-supplied retention window in days, and returns the deleted row count. |
PK82036_Task.Task_Purge |
Details |
Related documentation¶
- Index
- Overview
- Architecture
- Dependencies
- Business rules
- Database tables
- SQL catalog
- Procedures
- API reference
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
- SAIF.Business.Tasks/clsTaskCollection.vb
- SAIF.Business.Tasks/clsTaskActionCode.vb
- SAIF.Business.Tasks/clsTaskActionCodeCollection.vb
- SAIF.Business.Tasks/clsTaskCategoryCode.vb
- SAIF.Business.Tasks/clsTaskCategoryCodeCollection.vb
- SAIF.Business.Tasks/clsTaskPriorityCode.vb
- SAIF.Business.Tasks/clsTaskPriorityCodeCollection.vb
- SAIF.Business.Tasks/clsTaskSourceCode.vb
- SAIF.Business.Tasks/clsTaskSourceCodeCollection.vb