Skip to content

Bulk-raise claim tasks

Assembles many claim tasks through clsClaimTaskGenerator and persists them as one collection.

Field Value
Operation ID OP-2
Trigger An application process needs to raise one or more workflow tasks against claims
Inputs Text, optional assignee mailid, optional due date/offset, priority enum, claim category, notepad-required flag
Outputs Tasks queued in the inner collection, persisted on Save()
Primary components clsClaimTaskGenerator.AddTask, clsClaimTaskGenerator.NewTask, clsClaimTaskGenerator.Save
Entry point SAIF.Business.Tasks.Claim/clsClaimTaskGenerator.vb

Steps

  1. Construction: store DPI, resolve default claim (by ClaimID, claim number, or clsClaimData), create the inner collection via clsClaimTaskCollection.NewTaskCollection(dpi), and default m_CreateUser to dpi.UserID when not supplied (BR-GEN-04).
  2. AddTask(...) overloads normalize the due date before delegating: no-date overloads use clsSmartDate(Today).NextWorkDay; date overloads substitute NextWorkDay when the supplied date is not a working day; offset overloads use NextWorkDay(offset, NonWorkDayOption.PreviousWorkDay, False) (BR-GEN-02).
  3. Private NewTask(...): if inClaimID = 0, throw ApplicationException("ClaimID not specified") (BR-GEN-01).
  4. On failure: creation aborts with the exception.
  5. Create the task via clsClaimTask.NewTask(collection criteria DPI, inClaimID, m_CreateUser).

Origin: This step invokes Create a claim task, which builds and enriches the claim task. 5. If no assignee was supplied, resolve one: ClaimServices.GetResponsibleAdjuster(dpi, inClaimID) when no clsClaimData is cached, otherwise m_ClaimData.AdjusterMailID (BR-GEN-03). 6. If inNotePadRequired, set setNotePadFlag = "Y" (marks the task dirty and makes RequiresNotePadEntry true). 7. If a clsClaimData is cached, copy PolicyNumber onto the task. 8. Assign MailID (triggers BR-CT-03/BR-CT-06 via CheckRules("TaskUser")), Text (sanitized, triggers BR-CT-04/BR-CT-05), PriorityCode (from GetPriorityText), TaskDate. 9. Set CategoryCode to FSTRK for ClaimCategories.FastTrack, otherwise CLMM (BR-CT-10). 10. Register the extra rule IsValidClaimID on the task instance (BR-GEN-05) and add the task to the inner collection. 11. Save() forwards to m_Collection.Save() — the base collection applies edits and persists each task through the inherited stored-procedure path.

Origin: Persistence is implemented by SAIF.Business.Tasks; step 11 is the inherited task collection save path.

Process flow

flowchart TD
    Start([AddTask called]) --> Norm[Normalize due date]
    Norm --> Check{ClaimID = 0?}
    Check -->|Yes| Err([ApplicationException])
    Check -->|No| NewTask[Create claim task]
    NewTask --> Assignee{Assignee supplied?}
    Assignee -->|No| Resolve[Resolve responsible adjuster]
    Assignee -->|Yes| SetFields["Set MailID, Text, Priority,<br>Category"]
    Resolve --> SetFields
    SetFields --> Register[Register IsValidClaimID rule]
    Register --> Add[Add to inner collection]
    Add --> Save([Save persists collection])

Failure and edge-case behavior

  • Missing claim ID: ApplicationException("ClaimID not specified").
  • Rule failures surface through IsValid/ErrorMessages rather than exceptions.

Sources

  • SAIF.Business.Tasks.Claim/clsClaimTaskGenerator.vb