Batch address cleanse¶
Batch address cleanse hands a file path to the CorrectAddress vendor service so it can run a batch cleansing job server-side, then converts the vendor's raw integer return code into a typed BatchReturnTypes value the caller can branch on without memorizing vendor-specific codes.
| Field | Value |
|---|---|
| Operation ID | OP-CA-02 |
| Trigger | Caller invokes clsCleanAddress.RunCleanAddressBatch(inPath) |
| Inputs | inPath — path passed to the vendor batch operation |
| Outputs | clsBatchReturnInfo containing the normalized BatchReturnValue enum and the raw ReturnValue integer |
| Primary components | clsCleanAddress.RunCleanAddressBatch, clsBatchReturnInfo, BatchReturnTypes, CleanAddressSvc.clsCAServices |
| Entry point | Services\SAIF.Services.CleanAddress\clsCleanAddress.vb |
Steps¶
- Create a new
CleanAddressSvc.clsCAServicesproxy instance and setAllowAutoRedirect = TrueandUseDefaultCredentials = True. - Call
RunCleanAddressBatch(inPath, ByRef ReturnCode)on the proxy, passing the caller's file path and receiving the vendor's raw integer return code. - Map the raw return code to the
BatchReturnTypesenum according to BR-004: - Any value
>= 0maps toOk. -1maps toiniFileNotFound.-2maps toNoValidLicenseKey.-3maps toTrialExpired.- Any other value maps to
Unknown. - Return a new
clsBatchReturnInfoinstance populated with both the normalizedBatchReturnValueand the untouched rawReturnValue.
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start([Caller invokes RunCleanAddressBatch<br>with inPath]) --> Proxy[Create clsCAServices proxy]
Proxy --> Call[Call vendor RunCleanAddressBatch<br>ByRef ReturnCode]
Call --> Map{Map ReturnCode}
Map -->|>= 0| Ok[BatchReturnTypes.Ok]
Map -->|-1| Ini[BatchReturnTypes.iniFileNotFound]
Map -->|-2| Lic[BatchReturnTypes.NoValidLicenseKey]
Map -->|-3| Trial[BatchReturnTypes.TrialExpired]
Map -->|other| Unk[BatchReturnTypes.Unknown]
Ok --> Return([Return clsBatchReturnInfo])
Ini --> Return
Lic --> Return
Trial --> Return
Unk --> Return
Failure and edge-case behavior¶
- Return codes outside the four explicitly handled cases map to
BatchReturnTypes.Unknownper BR-004; this includes the enum's own sentinel value (-1000000001), which no vendor call is expected to return.* - The vendor call is not wrapped in a
Try/Catch; a SOAP fault or transport error propagates to the caller unhandled, unlike Address cleanse.* - The caller always receives both the normalized enum and the untouched raw return code, so it can fall back to inspecting
ReturnValuedirectly ifBatchReturnValueisUnknown.
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¶
Services\SAIF.Services.CleanAddress\clsCleanAddress.vbServices\SAIF.Services.CleanAddress\clsBatchReturnInfo.vbServices\SAIF.Services.CleanAddress\mdlEnums.vbServices\SAIF.Services.CleanAddress\Web References\CleanAddressSvc\Reference.vb