SeverityModelActivityService¶
Implements ISeverityModelActivityService, converting queued ClaimSeverityModelActivity rows (sourced via IUnitOfWork) into Guidewire activities submitted through IActivityDataApiClient, one activity request per claim/action-role combination. Each activity is tagged with the fixed subject "Severity Activity", pattern severity_activities, and normal priority, and is only sent if its action role maps to a known ActivityRole (Adjuster, Supervisor, or RTW Consultant); unmapped roles and failed Guidewire calls are recorded as errors rather than raised as exceptions.
Purpose¶
- Generates and submits Guidewire activities for every pending severity-model activity, grouped and processed claim by claim in claim-ID order.
- Maps a severity-model action role string to the Guidewire
ActivityRoleenum, rejecting (and logging as an error) any role that does not match a known mapping. - Captures per-claim errors — both unmapped action roles and Guidewire API call failures — into an error list returned as part of the creation report rather than throwing.
- Reports run totals: activities retrieved, activities successfully created, and the list of errors encountered.
Context¶
- Namespace:
SAIF.Services.Claims.SeverityModel - Assembly/package:
SAIF.Services(packaged inside theSAIF.SAIFCode.CoreNuGet package)
Public members¶
| Member | Signature | Purpose |
|---|---|---|
| SeverityModelActivityService | public SeverityModelActivityService(IUnitOfWork sqlServerUOW, IActivityDataApiClient activityDataApiClient) |
Wires the unit-of-work used to query pending severity-model activities and the Guidewire activity-API client used to submit them. |
| ActivityCreationErrors | public object ActivityCreationErrors |
A public field of type object that is never assigned within this type; it is unrelated to the populated ErrorList returned by CreateClaimActivities and appears unused.** |
| CreateClaimActivities | public ActivityCreationReport CreateClaimActivities(DateTime processDate) |
Loads all pending severity-model activities, submits a Guidewire activity request per entry (grouped by claim), and returns a report with the retrieved/created counts and any per-claim errors; the supplied processDate is stored but not otherwise used because the target-date field is intentionally left unpopulated. |
Behavioral notes¶
CreateClaimActivitiesdoes not wrap its work in an explicitIUnitOfWork.Begin()/Commit()transaction; it only reads activity data and calls the external Guidewire API — no local persistence of processed activities is performed by this method.*- A Guidewire API call failure for one claim's activity is caught and recorded as an
ActivityCreationError(reason"Call to ActivityAPI failed: <message>"), allowing processing to continue for remaining claims/activities rather than aborting the whole run. - An action role that does not match
"Adjuster","Supervisor", or"RTW Consultant"is recorded as an"Unknown Activity Action Role"error and skipped without calling the Guidewire API.
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¶
- Services/SAIF.Services/Claims/SeverityModel/SeverityModelActivityService.cs