SAIF.Business.Tasks architecture¶
SAIF.Business.Tasks sits between consuming task implementations and the BOF/Oracle data-access infrastructure. It does not define a concrete workflow of its own; instead, it provides the abstract task contract, lookup-code model, and persistence/query machinery that downstream task libraries extend.
Responsibilities¶
- Provide the abstract entity/collection contract for task-centric business objects.
- Separate core task behavior from reference-code lookups and from Oracle package operations.
- Preserve BOF lifecycle conventions for validation, retrieval, save, delete, and purge behavior.
Component boundaries¶
clsTask,clsTaskCollection,clsTaskContext, andclsTaskBusinessRulesform the reusable task core.clsTaskActionCode,clsTaskCategoryCode,clsTaskPriorityCode, andclsTaskSourceCodeform the read-only reference-data layer.pk82036_tasksupplies single-task persistence and purge behavior behind BOF lifecycle methods.- Concrete task implementations live outside this library and fill in the abstract members such as
ActionCode,SourceCode,Load(...),PostFill(),CopyTo(...),MarkCompleted(), andNewTask().
Interaction model¶
- A consuming library subclasses
clsTaskandclsTaskCollectionto define a typed task implementation. clsTaskvalidation runs BOF-required-field checks and task-specific rule helpers before persistence.- Single-task retrieve/insert/update/delete operations route through
pk82036_taskpackage calls. - Collection retrieval builds a dynamic
SELECTagainstTASKand materializes each row through the collection factory method. - Lookup collections issue direct read-only SQL against the task code tables.
Architecture diagram¶
The following diagram shows the major library components and their runtime dependencies.
flowchart TD
Consumer[Concrete task library<br>or application] --> TaskCore[clsTask / clsTaskCollection]
TaskCore --> Context[clsTaskContext]
TaskCore --> Rules[clsTaskBusinessRules]
TaskCore --> OraclePkg[pk82036_task package]
TaskCore --> QuerySql[Dynamic TASK SELECT]
TaskCore --> LookupLayer[Action / Category / Priority / Source lookup types]
OraclePkg --> TaskTable[(TASK)]
QuerySql --> TaskTable
LookupLayer --> CodeTables[(TASK_*_CODE)]
Sequence diagram¶
The following diagram shows the primary save/update interaction path.
sequenceDiagram
participant Consumer
participant Task as clsTask
participant Rules as clsTaskBusinessRules
participant Proc as pk82036_task
participant Oracle
Consumer->>Task: Save()
Task->>Rules: Evaluate BOF and task rules
Rules-->>Task: Validation outcome
Task->>Proc: task_insert / task_update / task_delete
Proc->>Oracle: Apply TASK row change
Oracle-->>Proc: SQL%ROWCOUNT
Proc-->>Task: RowsAffected
Task-->>Consumer: Success or contention/error state
Design constraints¶
- The library publishes an abstract task model; concrete task behavior depends on consuming subclasses outside this documentation set.
- All dependencies are package-based; the project has no
<ProjectReference>entries. - Collection retrieval mixes bind-variable filters with runtime string concatenation for some text/context filters, so query shape depends on the caller-supplied criteria.*
- The delete lifecycle performs a soft delete first; physical deletion is intentionally isolated to
Task_Purge.
Note: Statements marked with
*are inferred from code behavior rather than explicit documentation or comments.
Related documentation¶
- Index
- Overview
- Dependencies
- Operations and processes
- Business rules
- Database tables
- SQL catalog
- Procedures
- API reference
- Configuration
Sources¶
Business\SAIF.Business.Tasks\clsTask.vbBusiness\SAIF.Business.Tasks\clsTaskCollection.vbBusiness\SAIF.Business.Tasks\clsTaskContext.vbBusiness\SAIF.Business.Tasks\clsTaskBusinessRules.vbBusiness\SAIF.Business.Tasks\SAIF.BOF.Business.Tasks.vbproj