Insert letter request¶
This shared, base-class operation builds and executes a stored-procedure call to insert a pending letter-request record for a legal case and returns the generated request sequence number. It is a support operation called by Print DEF letter and Save hearing request / update case.
| Field | Value |
|---|---|
| Operation ID | OP-LGL-002 |
| Trigger | Called by clsScheduleManager.PrintDEF (DEF letter) or clsRequestManager.OnWrite (recon-request letter, SendReconRequest) |
| Inputs | letterTypeCode (5 chars), legal case number, claim ID, hold date, create user |
| Outputs | requestNum — generated letter-request sequence number |
| Primary components | LegalManagerBase.insertLetterRequest |
| Entry point | SAIF.Application.Claim.Legal\LegalManagerBase.vb |
Steps¶
- Build an
IDataRequestwithCommandType = StoredProcedureandSQLStatement = "pk80001_LEGALNET.insertLetterRequest"(SQL-001). - Bind parameters onto the request:
letterTypeCode(5 characters)aLegalCaseNumholdDate— nullable date; sent asDbType.Date(NULL) when the caller passesDate.MinValue, otherwise the actual date valuecreateUser(30 characters)aClaimIdrequestNum— bound as anInputOutputparameter- Execute the request via
DPI.DataAccessLayer.ProcessPortalRequest(SQL-001). - On failure: the underlying data-access exception propagates to the caller (no local catch in this operation).
- Read the output
requestNumparameter from the completed portal request and return it as the generated letter-request sequence number.
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start([Caller supplies letter type/case/claim/hold date]) --> Build[Build IDataRequest<br>StoredProcedure call]
Build --> Bind[Bind parameters<br>via insertLetterRequest]
Bind --> Exec[ProcessPortalRequest]
Exec --> Read[Read requestNum output parameter]
Read --> EndOk([Return requestNum])
Failure and edge-case behavior¶
holdDate = Date.MinValue: sent to Oracle as a NULL date rather than a literal minimum-date value.- Data-access failure during
ProcessPortalRequest: propagates unhandled to the calling operation (Print DEF letter or Save hearing request / update case).
Related documentation¶
Sources¶
SAIF.Application.Claim.Legal\LegalManagerBase.vb