User type management¶
This operation covers the EXT_USER_TYPE layer that hangs beneath a user account. It persists the user's roles, validates role-level business constraints, saves the related customer and access-group children, and exposes helper methods that support provider EFT administration and policyholder registration checks.
| Field | Value |
|---|---|
| Operation ID | OP-EU-06 |
| Trigger | User-type load, save, delete, or policy/provider helper request |
| Inputs | User type ID, user ID, customer ID, source-system identifiers, credentials, access groups, policy number, provider email |
| Outputs | Persisted EXT_USER_TYPE row, saved child groups, helper booleans, and EFT-related updates |
| Primary components | clsUserType.FillUserType, clsUserType.OnSave, clsUserTypeCollection.GetUserTypesByUserID, mdlCodeMaps.GetUserTypes, mdlCodeMaps.GetStatusTypes |
| Entry point | Business\SAIF.Business.External.Users\clsUserType.vb |
Steps¶
- Create or retrieve a user-type row. New rows allocate
EXT_USER_TYPE_SEQ; existing rows retrieve the user type by sequence number and fill the persisted fields fromEXT_USER_TYPEjoined to its code tables (SQL-009, SQL-030, EXT_USER_TYPE). - Load the type and status code maps.
mdlCodeMaps.GetUserTypescaches theEXT_USER_TYPE_CODEmap, whilemdlCodeMaps.GetStatusTypescaches and orders theEXT_USER_STATUS_CODEmap used by the broader user aggregate (SQL-038, SQL-039, EXT_USER_TYPE_CODE, EXT_USER_STATUS_CODE). - Load all user-type definitions for selection UIs when needed.
GetAllUserTypesreads the type code and prompt tables into placeholder rows that describe the required source-system inputs for each type (SQL-031, EXT_USER_TYPE_CODE). - Load a user's role assignments through the API projection.
GetUserTypesByUserIDcallsExternalLogin/UserTypesByUserId/{id}, thenFillUserTypehydrates each API record into aclsUserType, rehydrates access groups, and setsIsStewardfrom the steward access-group selection. - Validate source-system and collection rules before save.
- New rows require
CustomerID > 0. - Collection rules allow only one primary type, only one steward, and only one row for the same user type and source-system group.
- Policyholder rows require a numeric policy number.
- Agency steward rows cannot also select ARP Agency or Producer access.
- Validate policyholder access helpers when access groups are chosen.
ValidateStateAgencyAccessrequires entity code50before the state-agency group can be selected, andValidateWrapUpAccessrequires the policy to be the wrap-up parent before Wrap-Up Online can be selected. - Insert or update the
EXT_USER_TYPErow.BeforeInsertandBeforeUpdatebind user, customer, role, and source-system fields intoEXT_USER_TYPE; update uses theUPDATE_NUMconcurrency pattern (BR-EU-05, SQL-009, SQL-050, EXT_USER_TYPE). - Delete the row when the user type is removed.
BeforeDeleteremoves theEXT_USER_TYPErow by sequence number (SQL-056, EXT_USER_TYPE). - Save child objects around the row change.
OnSavealways saves the related customer, deselects and saves all access groups when the row is being deleted, and saves provider EFT child objects when they were loaded.OnSaveCompletesaves the access-group collection after the root insert or update. - Support provider EFT admin handoffs.
UpdateAdminUserEmailfinds the current admin user type for a provider and reassigns matching provider EFT rows to the current user type (SQL-032, EXT_USER_TYPE). - Update authorization-contact emails for active provider EFT rows.
UpdateEftAuthorizationEmailloads the provider EFT collection for the source-system group and updates activePAYMENT_AUTHORIZATIONrows with the new email and audit stamp (SQL-051, PAYMENT_AUTHORIZATION). - Run policy/provider helper checks used by registration paths.
IsQuotedPolicyExpired,IsBillingPlanEstablished, andIsBillingPlanSCInstallmentsinvoke Oracle package functions for policyholder registration checks (SQL-033, SQL-034, SQL-035).IsUserEobOwnerchecks whether the AD user owns any provider EOB interface rows (SQL-036, PROVIDER_EOB_INTERFACE).
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start([User-type request]) --> Load[Create or load user type]
Load --> Maps[Load code maps and access groups]
Maps --> Validate[Run role, policy, and collection validation]
Validate --> Action{Save, delete, or helper check?}
Action -->|Save| Persist[Insert or update user type and children]
Action -->|Delete| Remove[Delete row and clear groups]
Action -->|Helper| Helpers[Run policy or provider helper logic]
Persist --> Done([Return user-type result])
Remove --> Done
Helpers --> Done
Failure and edge-case behavior¶
- Primary-type and steward uniqueness are enforced at the in-memory collection layer before the database row is written.
- State-agency and wrap-up access checks depend on live policy data; a policy that no longer meets those conditions cannot keep the corresponding access selection.
- Provider EFT email updates only touch rows whose expiration date is blank or still current.
- The Oracle package bodies behind the policy helper calls are not present in this repository, so database-side decision details remain unknown.**
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.
Related documentation¶
Sources¶
Business\SAIF.Business.External.Users\clsUserType.vbBusiness\SAIF.Business.External.Users\mdlCodeMaps.vb