Skip to content

Business rules

SimpleCertifiedMailServiceProxy enforces several client-side rules around its one called operation, getCertifiedLabel: field truncation, a default account group, a preview/production mode selection, an in-band failure-to-exception conversion, and a page-count-based label size selection performed without calling the remote service.


BR-SCM-001 Address field truncation

Field Value
Statement FromAddress1, FromAddress2, and ToName are truncated to 46 characters before being sent to the remote service
Trigger Evaluated in GetCertifiedLabel before the SOAP call
Enforcement SimpleCertifiedMailServiceProxy.GetCertifiedLabel
Origin wrapper
Outcome A value longer than 46 characters is silently shortened; no exception is raised and no warning is logged
Related operation getCertifiedLabel
Reached from getCertifiedLabel
Source Services/SAIF.Services.Web.Proxies/SimpleCertifiedMailServiceProxy.cs:101-102,108

BR-SCM-002 Default account group

Field Value
Statement When the caller does not supply a GroupName, the request defaults to "ADMINISTRATION"
Trigger Evaluated in GetCertifiedLabel before the SOAP call
Enforcement SimpleCertifiedMailServiceProxy.GetCertifiedLabel
Origin wrapper
Outcome The remote service receives a default group name rather than a rejected or empty request
Related operation getCertifiedLabel
Reached from getCertifiedLabel
Source Services/SAIF.Services.Web.Proxies/SimpleCertifiedMailServiceProxy.cs:20,119

BR-SCM-003 Preview/production mode selection

Field Value
Statement The request Mode is production or preview, taken from CertifiedLabelData.IsProductionMode when the caller sets it; otherwise it follows IEnvironmentService.IsProduction
Trigger Evaluated in GetCertifiedLabel before the SOAP call
Enforcement SimpleCertifiedMailServiceProxy.GetModeOption / GetCertifiedLabel
Origin wrapper
Outcome A caller can force preview mode regardless of the hosting environment; otherwise the environment's production flag governs whether a real (billable) label is generated
Related operation getCertifiedLabel
Reached from getCertifiedLabel
Source Services/SAIF.Services.Web.Proxies/SimpleCertifiedMailServiceProxy.cs:125,143-151

BR-SCM-004 In-band failure converted to exception

Field Value
Statement A response with StatusCode other than 1 is converted to a SimpleCertifiedException carrying the remote StatusMessage, logged, and thrown
Trigger Evaluated immediately after the SOAP call returns
Enforcement SimpleCertifiedMailServiceProxy.GetCertifiedLabel
Origin wrapper
Outcome Callers that catch SimpleCertifiedException (only SubpoenaLabelService does) see a typed, logged failure; callers that do not catch it see the exception propagate. Transport-level exceptions are not converted and are not logged here
Related operation getCertifiedLabel
Reached from getCertifiedLabel
Source Services/SAIF.Services.Web.Proxies/SimpleCertifiedMailServiceProxy.cs:19,133-137

BR-SCM-005 Page-count-based label size selection

Field Value
Statement GetDefaultLabelData selects EnvelopeSize10 for up to 10 pages, Small for 11–19 pages, and Large for 20 or more pages, and throws InvalidNumberOfPagesException for more than 76 pages
Trigger Evaluated locally, before any call to the remote service, whenever a caller requests default label data by page count
Enforcement SimpleCertifiedMailServiceProxy.GetDefaultLabelData(int)
Origin wrapper
Outcome No SOAP call is made by this rule; it only shapes the request that a later getCertifiedLabel call would use. A page count over 76 fails fast with a typed exception rather than sending an oversized request
Related operation getCertifiedLabel (feeds its request; makes no call itself)
Reached from getCertifiedLabel (feeds its request; makes no call itself)
Source Services/SAIF.Services.Web.Proxies/SimpleCertifiedMailServiceProxy.cs:72-89

Sources

  • Services/SAIF.Services.Web.Proxies/SimpleCertifiedMailServiceProxy.cs
  • Services/SAIF.Services/Legal/Subpoenas/SubpoenaLabelService.cs