ATM participation and status¶
This operation covers the three façade methods that interact with the ATM vendor service: IsATMParticipant checks whether a routing number participates in the ATM network, GetATMAccountStatus retrieves and translates an account status (checking participation first), and TranslateStatusCode translates a status code the caller already has in hand. This is the only operation group in the library with two distinct fault/edge behaviors captured as business rules.
| Field | Value |
|---|---|
| Operation ID | OP-BV-04 |
| Trigger | Caller calls IsATMParticipant(inRoutingNum), GetATMAccountStatus(inRoutingNum, inAccountNum, inAmount, outStatusDescription), or TranslateStatusCode(inStatus) on a constructed clsValidateBank |
| Inputs | Routing number; for GetATMAccountStatus, also account number and amount; for TranslateStatusCode, a status code |
| Outputs | Boolean participation flag (IsATMParticipant); Integer status code plus an outStatusDescription byref string (GetATMAccountStatus); or a translated description string (TranslateStatusCode) |
| Primary components | clsValidateBank.IsATMParticipant, clsValidateBank.GetATMAccountStatus, clsValidateBank.TranslateStatusCode, clsValidateBank.LogonATM, clsValidateBank.LogoffATM |
| Entry point | Legacy\BankValidator\clsValidateBank.vb |
Steps¶
- Log on to the ATM service.
LogonATM()incrementsm_LogonAttempts, lazily constructsATMService.ATMServiceif needed, sets itsUrlfromURLATM, and callsATM.Logon(CompanyId, UserId, Password)to obtain aLogonToken(BR-002). - On failure: recursively retries
LogonATM()whilem_LogonAttempts < m_LogonAttemptsMax, then throwsApplicationException("Unable to logon to ATM web service.", ex)once exhausted. IsATMParticipant— check participation. Wrapped inTry/Catch, callATM.IsParticipant(LogonToken, inRoutingNum)and assign the result toisValid.- On
SoapException: assignisValid = False, treating the fault as non-participation (BR-005). - On any other exception: throw
ApplicationException("Error while trying to check the ATM participant", ex). LogoffATM()runs inFinallyregardless of outcome.GetATMAccountStatus— initialize defaults.statusCodeis set to-1andoutStatusDescriptionis set to"Unknown"before any vendor call, establishing the fallback outcome up front.GetATMAccountStatus— check participation. CallATM.IsParticipant(LogonToken, inRoutingNum)(not wrapped inTry/Catchat this call site).- If the bank participates: call
ATM.GetStatusCode(LogonToken, inRoutingNum, inAccountNum, inAmount.ToString("0000000.00"))to getstatusCode, then callATM.TranslateStatusCode(LogonToken, statusCode)to resolveoutStatusDescription. - If the bank does not participate: leave
statusCode = -1andoutStatusDescription = "Unknown"(BR-004). - Because this method has no
Try/Catch, any exception fromATM.IsParticipant,ATM.GetStatusCode, orATM.TranslateStatusCodepropagates directly to the caller andLogoffATM()is skipped.* TranslateStatusCode— translate a code. CallATM.TranslateStatusCode(LogonToken, inStatus)and assign the result toresult(default"Unknown").- Not wrapped in
Try/Catch; an exception propagates directly to the caller and skipsLogoffATM().* - Log off the ATM service.
LogoffATM()callsATM.Logoff(LogonToken), disposes theATMproxy, and sets it toNothing(guaranteed viaFinallyonly forIsATMParticipant; called unconditionally at the end ofGetATMAccountStatusandTranslateStatusCodewhen no exception is thrown). - On failure: the exception is silently swallowed (the
Throwline is commented out). - Return the result.
IsATMParticipantreturns the participation Boolean;GetATMAccountStatusreturnsstatusCodeand setsoutStatusDescriptionby reference;TranslateStatusCodereturns the description string.
Process flow¶
The following diagram visualizes the three method flows, highlighting the participation-check branch used by GetATMAccountStatus and the fault handling unique to IsATMParticipant.
flowchart TD
Start([Caller calls IsATMParticipant,<br>GetATMAccountStatus, or TranslateStatusCode]) --> Logon[LogonATM:<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 -->|IsATMParticipant| Part[ATM.IsParticipant]
Part --> PartFault{SoapException?}
PartFault -->|Yes| NonPart[isValid = False]
PartFault -->|No, other| PartEx([ApplicationException thrown])
PartFault -->|No| PartOk[isValid = vendor result]
Which -->|GetATMAccountStatus| Defaults[statusCode = -1<br>outStatusDescription = Unknown]
Defaults --> Part2[ATM.IsParticipant]
Part2 --> IsPart{Participant?}
IsPart -->|No| KeepDefaults([Return -1 / Unknown])
IsPart -->|Yes| GetStatus[ATM.GetStatusCode]
GetStatus --> Translate[ATM.TranslateStatusCode]
Translate --> StatusResult([Return status code<br>and description])
Which -->|TranslateStatusCode| Trans[ATM.TranslateStatusCode]
Trans --> TransResult([Return description string])
NonPart --> Logoff[LogoffATM:<br>release token, dispose proxy]
PartOk --> Logoff
Logoff --> Done([Return result])
StatusResult --> Logoff2[LogoffATM]
TransResult --> Logoff3[LogoffATM]
Failure and edge-case behavior¶
- If the ATM logon fails repeatedly, the caller receives an
ApplicationExceptionafterm_LogonAttemptsMaxretries (BR-002); no ATM check is attempted for any of the three methods. IsATMParticipantis the only one of the three methods that wraps the vendor call inTry/Catch: aSoapExceptionresolves toFalse(BR-005) andLogoffATM()is guaranteed viaFinally.GetATMAccountStatushas no exception handling aroundATM.IsParticipant,ATM.GetStatusCode, orATM.TranslateStatusCode; a vendor fault propagates unhandled andLogoffATM()is skipped, unlikeIsATMParticipant.*GetATMAccountStatusreturns-1and"Unknown"specifically when the routing number is not an ATM participant (BR-004) — a different code path from theSoapExceptionhandling inIsATMParticipant(BR-005); the two rules must not be conflated.TranslateStatusCodehas no participation check and no exception handling; it assumes the caller already has a valid status code from a priorGetATMAccountStatuscall.*LogoffATMfailures are intentionally swallowed and never surface to the caller.*- Historical source comments note the ATM web service was discontinued by the vendor as of 11/30/2006 and re-enabled as of 01/08/2007; the current code paths reflect the re-enabled, fully functional service.
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