OP-021: Resolve an external user and its primary contact¶
GetExternalUser 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-021
Trigger
Caller invokes GetExternalUser over the Security route.
LogRequestDetails logs the operation name and arguments (BR-WCF-032).
TryGetExternalUser queries ExternalUser by upper-cased user id; a miss returns null; the projection maps IsActive from IsAuthorizedUser and IsAccountLocked from its negation (BR-WCF-019a).
The primary user type (UserTypes.FirstOrDefault(x => x.IsPrimary)) sets IsInjuredWorker when its code is one of WORK, GUARD, POWA, and populates PrimaryUserType, defaulting the two description fields to "" (BR-WCF-020a).
ContactFactory.CreatePrimaryContact(user.Person) selects the first active primary address, email, fax (phone code F), and non-fax phone, builds the PersonName, and normalizes every null string to "" (BR-WCF-021a, BR-WCF-033).
Return.
On failure: an Oracle/NHibernate exception is logged by the installed error handler and surfaced as a generic SOAP fault with exception detail included.
The following diagram visualizes this process's control flow.
flowchart TD
A["Log request details"]
B["Query ExternalUser by<br>upper-cased user id"]
C["Determine primary user type<br>and injured worker status"]
D["Build primary contact projection"]
E["Return."]
A --> B
B --> C
C --> D
D --> E
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.