Snapshotrestore task state¶
This operation captures a task's current field values into an in-memory snapshot (TaskStore) and can later restore them, supporting the framework's edit/cancel lifecycle.
| Field | Value |
|---|---|
| Operation ID | OP-11 |
| Trigger | Framework edit/cancel lifecycle |
| Inputs | clsTask instance |
| Outputs | TaskStore snapshot / restored field values |
| Primary components | clsTask.StoreValues, clsTask.RestoreValues |
| Entry point | SAIF.Business.Tasks/clsTask.vb |
Steps¶
StoreValuesbuilds a freshTaskStorehashtable with 25 keyed values; smart types are stored only when non-empty.RestoreValuesreads the stored values back, rehydrating smart types as "original", and ends withMarkOld().- Defect:
StoreValuesstores context text under keyContextText, butRestoreValuesreads keyContextTextValue— the restored context text is therefore always empty.*
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start([Edit lifecycle begins]) --> S1["StoreValues builds TaskStore<br>with 25 keys"]
S1 --> Edit[Caller edits task fields]
Edit --> D{Cancel edit?}
D -->|Yes| S2["RestoreValues reads<br>TaskStore back"]
S2 --> S3[MarkOld]
D -->|No| EndOk([Edit committed via Save])
S3 --> EndRestored([Original values restored])
Failure and edge-case behavior¶
- Context text is never correctly restored due to the
ContextText/ContextTextValuekey mismatch betweenStoreValuesandRestoreValues— whether this is an intentional omission or a defect is unknown.**
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