OP-022: Resolve the most-recent external user for a customer group and user type¶
GetExternalUserByCustomerId 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-022
Trigger
Caller invokes GetExternalUserByCustomerId over the Security route.
LogRequestDetails logs the operation name and arguments (BR-WCF-032).
GetCustomerUserId joins ExternalUser to its UserTypes, filters by CustomerGroupId and the permitted type codes, orders by LastLogonDate descending, and takes the first user id (BR-WCF-034); a null user id returns null.
Otherwise the resolved user id runs through the same TryGetExternalUser projection used by GetExternalUser (BR-WCF-019a, BR-WCF-020a, BR-WCF-021a).
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["Resolve most-recent user id<br>for customer/type"]
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
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.