Skip to content

ProcessOB3PRetention business rules

Rules are listed by identifier. Application-origin rules are enforced in ThirdPartyRetentionProcessor, ArgContainer, and the two service wrappers. The operation that applies them is Process third-party retention.

BR-OB3P-001 Processing date defaults to current date

Field Value
Statement The processing date sent to the Imaging API is the current local date unless Day, Month, or Year is supplied; each component can be overridden independently.
Trigger Argument resolution
Enforcement ArgContainer.BuildArgumentResolvers captures DateTime.Now and uses it as the NotRequired default
Origin Application
Outcome Missing components take today's value; no range validation is applied
Source ProcessOB3PRetention/ArgContainer.cs

BR-OB3P-002 Batch size from environment setting with default of 100

Field Value
Statement Claims are sent in batches of the size configured in processob3pretention.processbatchsize when it is a positive integer; otherwise 100.
Trigger At least one eligible claim is returned
Enforcement GetProcessBatchSize uses int.TryParse and a > 0 check, with a code fallback constant of 100; a missing key throws ApplicationException from the framework GetConfigSetting
Origin Application
Outcome Empty, non-integer, zero, or negative values use 100. The value of 200 seeded for prod, entqa, and npuat in environmentSettings/settings.yml is separate from the code fallback
Source ProcessOB3PRetention/ThirdPartyRetentionProcessor.cs

BR-OB3P-003 Eligibility is decided by the Imaging API

Field Value
Statement The console application applies no eligibility filter; every record returned by the Imaging API toProcess endpoint for the month, day, and year is processed.
Trigger Start of Execute
Enforcement ImagingApiClient.GetClaimIdsForRetentionProcessing returns the response unfiltered
Origin Application (policy is evaluated by the Imaging API)
Outcome The set of claims processed equals the API response
Source ProcessOB3PRetention/ThirdPartyRetentionProcessor.cs, ProcessOB3PRetention/Services/ImagingApiClient.cs

BR-OB3P-004 Batch sent to OnBase as a placeholder document

Field Value
Statement Each batch is submitted to OnBase as one ArchiveDocument call carrying a fixed placeholder text document (test doc, MIME type text/plain) with the batch's claim numbers in the ClaimNumber_Collection keyword.
Trigger Each batch
Enforcement OnBaseService.ProcessRetention
Origin Application
Outcome OnBase returns a document id, which is logged; what OnBase does with the submission is not visible from this repository**
Source ProcessOB3PRetention/Services/OnBaseService.cs

BR-OB3P-005 Mark processed only after OnBase succeeds

Field Value
Statement A batch's retention records are marked processed in the Imaging API only after the OnBase call for that batch returns without error.
Trigger Each batch
Enforcement Sequential calls in the foreach loop of Execute
Origin Application
Outcome A failed OnBase call leaves the records unmarked; a failed mark leaves the batch archived but unmarked, so it may be resubmitted on the next run*
Source ProcessOB3PRetention/ThirdPartyRetentionProcessor.cs

BR-OB3P-006 Zero eligible claims is a successful run

Field Value
Statement When the Imaging API returns no claims, the run logs No claims eligible for retention policy deletion. and ends with exit code 0.
Trigger Empty response
Enforcement Execute length check
Origin Application
Outcome No OnBase or mark-processed calls are made; the batch size setting is not read
Source ProcessOB3PRetention/ThirdPartyRetentionProcessor.cs

BR-OB3P-007 Any error stops the run without rollback

Field Value
Statement Any exception stops processing of remaining batches and fails the run with exit code 5; completed batches are not undone.
Trigger Exception in Execute or while resolving the application
Enforcement Exceptions from Execute are caught by ThirdPartyRetentionProcessor.Execute, which writes Error: <message> to stderr and rethrows. Exceptions raised while resolving the application occur before the processor exists, so that catch does not apply; the inherited framework runner maps any unhandled execution or application-resolution exception to exit code 5 (inherited framework behavior)†
Origin Application
Outcome Exit code 5; earlier batches remain archived and marked
Source ProcessOB3PRetention/ThirdPartyRetentionProcessor.cs

BR-OB3P-008 Audit user is fixed

Field Value
Statement The mark-processed call always passes updateUser=ProcessOB3PRetention, regardless of the account running the process.
Trigger Each mark-processed call
Enforcement Constant in the request path
Origin Application
Outcome Updates in the Imaging API are attributed to ProcessOB3PRetention
Source ProcessOB3PRetention/Services/ImagingApiClient.cs

INH-OB3P-001 Invalid arguments exit with code 1

Field Value
Statement When argument resolution fails, the runner writes the failures to stderr, sets exit code 1, and does not run the application.†
Trigger Argument validation failure
Enforcement SaifStandardProgramBase.Run
Origin SAIF.Framework.Windows (inherited)
Outcome Exit code 1
Source ProcessOB3PRetention/Program.cs

INH-OB3P-002 Unhandled exceptions exit with code 5

Field Value
Statement An exception escaping Execute or application resolution is reported to stderr and ends the run with exit code 5.†
Trigger Unhandled exception
Enforcement SaifStandardProgramBase.Run
Origin SAIF.Framework.Windows (inherited)
Outcome Exit code 5
Source ProcessOB3PRetention/Program.cs

Documentation Description
Index Documentation entry point
Overview Purpose and capabilities
Architecture Components and composition root
Run lifecycle Execution flow and exit codes
Arguments Argument contract
Configuration Settings and environment variables
Dependencies Packages and API dependencies
Operations and processes Operation catalog
Operational runbook Run and recovery procedures
Tech debt Technical debt observations

Note: Statements marked with † are derived from dependency library documentation via the Legends CLI. Statements marked with * were inferred from code structure or contextual evidence. Statements marked with ** could not be confirmed; treat as unknown until verified.

Sources

  • ProcessOB3PRetention/ArgContainer.cs
  • ProcessOB3PRetention/ThirdPartyRetentionProcessor.cs
  • ProcessOB3PRetention/Services/ImagingApiClient.cs
  • ProcessOB3PRetention/Services/OnBaseService.cs
  • ProcessOB3PRetention/Program.cs
  • environmentSettings/settings.yml