Copy a task to another user¶
This operation copies a task's core fields onto a new task instance — used when reassigning or forwarding a task to a different user.
| Field | Value |
|---|---|
| Operation ID | OP-10 |
| Trigger | Descendant CopyTo(inMailID) |
| Inputs | Source clsTask |
| Outputs | New iTask with copied fields and duplicated context |
| Primary components | clsTask.CopyTask |
| Entry point | SAIF.Business.Tasks/clsTask.vb |
Steps¶
- Copy
CategoryCode,PriorityCode,NotepadFlag,TaskDate,MailID,Textonto the target instance. - For
ClaimID,ImageSeqNum,PolicyNumber: propagate null via the correspondingSet*Null()method when the source smart value is empty; otherwise copy the value. - Assign
inTask.TaskContext = TaskContext.Duplicate()— a deep copy that preserves empty/null state. - The public
CopyTo(inMailID)method itself is abstract; descendants create the new instance and callCopyTaskto populate it.*
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start([Descendant CopyTo called]) --> S1["Descendant creates new task<br>instance"]
S1 --> S2[CopyTask copies core fields]
S2 --> S3{"ClaimID/ImageSeqNum/PolicyNumber<br>empty?"}
S3 -->|Yes| S4[Propagate null via Set*Null]
S3 -->|No| S5[Copy value]
S4 --> S6["TaskContext.Duplicate deep<br>copy"]
S5 --> S6
S6 --> EndOk([New task instance returned])
Failure and edge-case behavior¶
- No error handling logic is present in
CopyTaskitself; behavior depends entirely on the descendant'sCopyToimplementation*.
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