Retrieve claim tasks¶
This operation loads Claims-source tasks into one of two collection shapes: clsClaimTaskCollection, a general-purpose claim-task list sorted by task date and priority, or clsMyTaskCollection, a caller-specific "my tasks" list that additionally sorts urgent tasks to the top per claim and masks the worker name on any task that exposes a restricted claim attribute the caller cannot see. Both collections build on the inherited BOF task retrieval pipeline; this library only supplies the Claims task-source filter, the sort order, and (for clsMyTaskCollection) the access-based masking.
| Field | Value |
|---|---|
| Operation ID | OP-TC-01 |
| Trigger | Caller invokes clsClaimTaskCollection.GetTasks(dpi, criteria) or clsMyTaskCollection.GetTasks(dpi, criteria), or the parameterless NewTaskCollection(dpi) factories |
| Inputs | IDataPortalInfo; a ClaimTaskCriteria or MyTaskCriteria (task date range, claim/policy filters inherited from clsTaskCollection.Criteria) |
| Outputs | Populated clsClaimTaskCollection or clsMyTaskCollection, sorted per collection type; WorkerName masked to "Confidential" on restricted clsMyTaskCollection rows |
| Primary components | clsClaimTaskCollection.GetTasks, clsClaimTaskCollection.SortByDefault, clsMyTaskCollection.GetTasks, clsMyTaskCollection.AfterRetrieve, clsMyTaskCollection.setSortOrder, clsMyTaskCollection.SortByDefault |
| Entry point | Business\SAIF.Business.Tasks.Claim\clsClaimTaskCollection.vb |
Steps¶
- The caller supplies an
IDataPortalInfoand either aClaimTaskCriteria(forclsClaimTaskCollection) or aMyTaskCriteria(forclsMyTaskCollection). GetTaskssetsinSelectionCriteria.DataPortalInfoand callsAddTaskSourceSystem(TaskSourceSystem.Claims)on the criteria, restricting the retrieve to Claims-sourced tasks regardless of what the caller's criteria otherwise specifies.- The criteria is passed to
inDataPortalInfo.DataAccessLayer.RetrieveObject, which executes the inherited BOF collection-retrieve pipeline. - Sub-step: the base collection criteria builds the filtered
TASKquery from the caller's date range, claim, policy, and context filters and executes it against Oracle. - Sub-step: the base retrieve pipeline reads the result set, instantiates one typed task per row through
NewTask(), and callsPostFill()on each row (see Claim task lifecycle, step 3, for whatPostFilldoes on aclsClaimTask).
Origin: The filtered collection query and row-materialization pipeline are implemented by
clsTaskCollectioninSAIF.Business.Tasks. That library is documented in the previous format, so no per-operation page exists; see Retrieve task collection in theSAIF.Business.Tasksdocumentation set. 4. ForclsClaimTaskCollection, once all rows are added the collection is sorted bySortByDefault(): task date ascending, thenPriorityCodeascending. 5. ForclsMyTaskCollection,AfterRetrieveoverrides the base row-load loop instead of relying purely on the inherited pipeline: - It first resolves four caller-access flags once for the whole retrieve:ExposureAccess,ConflictAccess,HealthIssueAccess, andSecuredAccess, fromClaimServices.HasExposureAccess,HasConflictAccess,HasCollateralAccess, andHasSecureAccess.
> **Origin**: The underlying access checks are implemented by `ClaimServices` in `SAIF.BOF.Business`; see [ClaimServices](../../saif-business/api/SAIF.Business/claimservices.md) in the `SAIF.BOF.Business` documentation set.
- For each reader row, it reads
TaskSourceCode, creates a task throughNewTask()(aclsClaimTask), and throws anApplicationExceptionnaming the unsupported task source ifNewTask()returns nothing. - Otherwise it calls
Task.LoadAfterSort(dpi, reader)(an internal alias forLoad) to fill the task, callssetSortOrder(task)to compute the task's rank, and adds the task to the collection. - If the task's
IsExposure,isHealthIssue,isHostileWrkr, orIsWorkerConflictflag is true and the matching access flag (ExposureAccess,HealthIssueAccess,SecuredAccess,ConflictAccess) is false: it setsTask.WorkerName = "Confidential"(BR-011). setSortOrdertracks the last claim ID seen; the first task loaded for a new claim ID becomes the sort anchor — if that first task'sPriorityCodeis"URG", every task under that claim ID sorts by that claim's own ID (grouping urgent claims at low sort values), otherwise the claim's tasks sort by a shared large constant (m_lastNormalNum) alongside all other non-urgent claims.- After all rows are read,
SortByDefault()sorts the collection bysortByascending, thenTaskDateascending, thenClaimNumascending.
Process flow¶
The following diagram visualizes the retrieval and, for "my tasks", the masking path.
flowchart TD
Start([Caller calls GetTasks]) --> SetSource[AddTaskSourceSystem Claims]
SetSource --> Retrieve[RetrieveObject executes<br>inherited BOF collection query]
Retrieve --> Which{Which collection?}
Which -->|clsClaimTaskCollection| SortDefault[SortByDefault:<br>TaskDate, PriorityCode]
SortDefault --> Done([Return sorted collection])
Which -->|clsMyTaskCollection| Access[Resolve Exposure, Conflict,<br>HealthIssue, Secured access flags]
Access --> Loop[For each row:<br>load task, compute sortBy]
Loop --> Mask{Restricted flag true<br>and access flag false?}
Mask -->|Yes| Confidential[WorkerName = Confidential]
Mask -->|No| NoMask[WorkerName unchanged]
Confidential --> More{More rows?}
NoMask --> More
More -->|Yes| Loop
More -->|No| SortMy[SortByDefault:<br>sortBy, TaskDate, ClaimNum]
SortMy --> Done
Failure and edge-case behavior¶
- If a retrieved row's
TaskSourceCodedoes not map to a supported task type,clsMyTaskCollection.AfterRetrievethrows anApplicationExceptionnaming the source, aborting the entire retrieve rather than skipping the row. - Masking in
clsMyTaskCollectiononly ever overwritesWorkerName; the underlyingIsExposure,isHealthIssue,isHostileWrkr, andIsWorkerConflictflags and the rest of the task's fields remain visible to the caller regardless of access (BR-011).* clsClaimTaskCollectionperforms no access-based masking; onlyclsMyTaskCollectionapplies BR-011.- Both collections restrict to the Claims task source regardless of criteria the caller may have already populated on
TaskSourceSystem.
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.
Sources¶
Business\SAIF.Business.Tasks.Claim\clsClaimTaskCollection.vbBusiness\SAIF.Business.Tasks.Claim\clsMyTaskCollection.vb