Skip to content

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

  1. Initialize the result. companyId is initialized to 0 before any vendor interaction.
  2. Log on to the ABA service. LogonABA() increments m_LogonAttempts, lazily constructs ABAService.ABAService if needed, sets its Url from URLABA, and calls ABA.Logon(CompanyId, UserId, Password) to obtain a LogonToken (BR-002).
  3. On failure: recursively retries LogonABA() while m_LogonAttempts < m_LogonAttemptsMax.
  4. On failure after the retry limit is exhausted: throws ApplicationException("Unable to logon to ABA web service.", ex).
  5. Invoke the vendor lookup.
  6. For FindAsCompanyId: call ABA.FindASCompanyID(inSerialNum, inPayeeCode) and assign the result to companyId.
  7. For FindByCompanyName: call ABA.FindCompanyID(inCompanyName) and assign the result to companyId.
  8. 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.*
  9. Log off the ABA service. LogoffABA() calls ABA.Logoff(LogonToken), disposes the ABA proxy, and sets it to Nothing.
  10. On failure: the exception is silently swallowed (the Throw line is commented out).
  11. Return the result. companyId is 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 ApplicationException after m_LogonAttemptsMax retries (BR-002); no lookup is attempted.
  • Because the vendor invocation is not wrapped in Try/Catch, an exception from ABA.FindASCompanyID or ABA.FindCompanyID propagates unhandled to the caller and LogoffABA() 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 (commonly 0); no explicit not-found branch exists in the façade code beyond the pre-initialized companyId = 0.*
  • LogoffABA failures 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.

Sources

  • Legacy\BankValidator\clsValidateBank.vb