Skip to content

OP-023: Resolve the most-recent external injured-worker user for a customer group

GetInjuredWorkerUserByCustomerId is invoked over the Security route on SAIF.Services.WCF.Services.Security.SecurityService; this page documents the process end to end, from route dispatch to the message the caller receives.

Field Value
Operation ID OP-023
Trigger Caller invokes GetInjuredWorkerUserByCustomerId over the Security route.
Entry operation GetInjuredWorkerUserByCustomerId
Owning component SAIF.Services.WCF.Services.Security.SecurityService.GetInjuredWorkerUserByCustomerId
Inputs Request message parts listed below
Outputs An ExternalUser projection for the most-recently-logged-in matching injured-worker user.
Failure behavior Generic SOAP fault, per Faults and error pipeline

Request and response

Direction Element Type Declared in Notes
Request customerId string BCL (System) Customer group identifier used to locate the most-recently-logged-in injured-worker user. (Yes)
Response ExternalUser ExternalUser External contracts assembly (SAIF.Services.WCF.Contracts / framework closure) ** An ExternalUser projection for the most-recently-logged-in matching injured-worker user.

Steps

  1. LogRequestDetails logs the operation name and arguments (BR-WCF-032).
  2. GetCustomerUserId runs with the user-type codes fixed to WORK, GUARD, POWA, joining ExternalUser to its UserTypes, filtering by CustomerGroupId, ordering by LastLogonDate descending, and taking the first user id (BR-WCF-034); a null user id returns null.
  3. Otherwise the resolved user id runs through the same TryGetExternalUser projection used by GetExternalUser (BR-WCF-019a, BR-WCF-020a, BR-WCF-021a).
  4. Return.
  5. On failure: an Oracle/NHibernate exception is logged by the installed error handler and surfaced as a generic SOAP fault with exception detail included.

Process flow

The following diagram visualizes this process's control flow.

flowchart TD
    A["Log request details"]
    B["Resolve most-recent injured-worker<br>user id for customer"]
    B1{"User id resolved?"}
    B2["Null user id: return null"]
    C["Project user via TryGetExternalUser"]
    D["Return."]
    A --> B
    B --> B1
    B1 -->|"No"| B2
    B1 -->|"Yes"| C
    B2 --> D
    C --> D

Transaction and side effects

Aspect Finding
Unit of work OracleUnitOfWorkFactory (EXTUR)
Commit point Not applicable — read only
Records written ExternalUser, ExternalUserType, Person, Address, Phone (read only)
Downstream calls None
Shared state touched None
Repeat-call behavior Idempotent read; result can change as LastLogonDate values change

Logging

Surface Written content
HttpContext.Current.Response.AppendToLog (LogRequestDetails) Writes IIS request-detail log lines when LOG_REQUEST_DETAILS is enabled
ErrorLogErrorHandler → LogService Failure-path exception logging only, carrying method signature, calling user and exception detail; see Faults and error pipeline

Faults and error handling

Failure Fault type the caller receives Produced by Source
Oracle/NHibernate exception Generic SOAP fault The ErrorLogErrorHandler installed by [LogErrorBehavior] src/WCF/SAIF.Services.WCF.Host/Services/Security/Users/UserFactory.cs

Authorization

Requirement Enforced by Source Applies to
None in code IIS authentication on the deployment (see Activation and hosting) src/WCF/SAIF.Services.WCF.Host/Services/Security/SecurityService.cs This operation

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

  • src/WCF/SAIF.Services.WCF.Host/Services/Security/SecurityService.cs
  • src/WCF/SAIF.Services.WCF.Host/Services/Security/Users/UserFactory.cs