Company identifier lookup¶
This operation covers the two façade methods that resolve a vendor-side company identifier: FindAsCompanyId looks up a company by an associated serial number and payee code, and FindByCompanyName looks up a company by its name. Both delegate to the ABA vendor service and share the same logon/invoke/logoff shape.
| Field | Value |
|---|---|
| Operation ID | OP-BV-02 |
| Trigger | Caller calls FindAsCompanyId(inSerialNum, inPayeeCode) or FindByCompanyName(inCompanyName) on a constructed clsValidateBank |
| Inputs | inSerialNum and inPayeeCode (for FindAsCompanyId), or inCompanyName (for FindByCompanyName) |
| Outputs | Integer company ID (defaults to 0 before the vendor call is made) |
| Primary components | clsValidateBank.FindAsCompanyId, clsValidateBank.FindByCompanyName, clsValidateBank.LogonABA, clsValidateBank.LogoffABA |
| Entry point | Legacy\BankValidator\clsValidateBank.vb |
Steps¶
- Initialize the result.
companyIdis initialized to0before any vendor interaction. - Log on to the ABA service.
LogonABA()incrementsm_LogonAttempts, lazily constructsABAService.ABAServiceif needed, sets itsUrlfromURLABA, and callsABA.Logon(CompanyId, UserId, Password)to obtain aLogonToken(BR-002). - On failure: recursively retries
LogonABA()whilem_LogonAttempts < m_LogonAttemptsMax. - On failure after the retry limit is exhausted: throws
ApplicationException("Unable to logon to ABA web service.", ex). - Invoke the vendor lookup.
- For
FindAsCompanyId: callABA.FindASCompanyID(inSerialNum, inPayeeCode)and assign the result tocompanyId. - For
FindByCompanyName: callABA.FindCompanyID(inCompanyName)and assign the result tocompanyId. - Neither method wraps this call in a
Try/Catch; an exception raised by the vendor call propagates directly to the caller and skips step 4.* - Log off the ABA service.
LogoffABA()callsABA.Logoff(LogonToken), disposes theABAproxy, and sets it toNothing. - On failure: the exception is silently swallowed (the
Throwline is commented out). - Return the result.
companyIdis returned to the caller.
Process flow¶
The following diagram visualizes the shared control flow for both company-lookup methods.
flowchart TD
Start([Caller calls FindAsCompanyId<br>or FindByCompanyName]) --> Init[companyId = 0]
Init --> Logon[LogonABA:<br>logon with retry up to m_LogonAttemptsMax]
Logon --> LogonOk{Logon succeeded?}
LogonOk -->|No, retries exhausted| Ex([ApplicationException thrown])
LogonOk -->|Yes| Which{Which method?}
Which -->|FindAsCompanyId| BySerial[ABA.FindASCompanyID]
Which -->|FindByCompanyName| ByName[ABA.FindCompanyID]
BySerial --> Fault{Vendor call throws?}
ByName --> Fault
Fault -->|Yes| Propagate([Exception propagates;<br>LogoffABA skipped])
Fault -->|No| Logoff[LogoffABA:<br>release token, dispose proxy]
Logoff --> Done([Return companyId])
Failure and edge-case behavior¶
- If the ABA logon fails repeatedly, the caller receives an
ApplicationExceptionafterm_LogonAttemptsMaxretries (BR-002); no lookup is attempted. - Because the vendor invocation is not wrapped in
Try/Catch, an exception fromABA.FindASCompanyIDorABA.FindCompanyIDpropagates unhandled to the caller andLogoffABA()is never reached, leaving the ABA proxy and logon token unreleased.* - If the vendor returns no match, the observable behavior is a vendor-supplied
Integer(commonly0); no explicit not-found branch exists in the façade code beyond the pre-initializedcompanyId = 0.* LogoffABAfailures are intentionally swallowed and never surface to the caller.*
Note: Statements marked with
*were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts.
Related documentation¶
Sources¶
Legacy\BankValidator\clsValidateBank.vb