Skip to content

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

  1. Copy CategoryCode, PriorityCode, NotepadFlag, TaskDate, MailID, Text onto the target instance.
  2. For ClaimID, ImageSeqNum, PolicyNumber: propagate null via the corresponding Set*Null() method when the source smart value is empty; otherwise copy the value.
  3. Assign inTask.TaskContext = TaskContext.Duplicate() — a deep copy that preserves empty/null state.
  4. The public CopyTo(inMailID) method itself is abstract; descendants create the new instance and call CopyTask to 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 CopyTask itself; behavior depends entirely on the descendant's CopyTo implementation*.

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