Current Implementation and To Be
Overview
When a FileClassified event is received from the Service Bus, the document-splitter service downloads the original PDF and its classification result, splits the PDF into separate files per classified form, uploads each split to blob storage, saves a manifest, and publishes a FileSplitFile event per output file for downstream processing.
Flow
Key Components
Events
Input – FileClassifiedEvent
Output – FileSplitFileEvent (one per split file)
Error – ProblemEvent
Published when processing fails. Returns 404 if the blob is not found, 500 for all other errors.
Blob Storage Layout
Manifest Schema
Edge Cases
- No forms in classification → skipped with a warning, no split produced.
- Form with no valid page range → skipped with a warning.
- Multiple page ranges per form → one split file produced per range (concurrent upload).
- Any processing error →
ProblemEventpublished; error is rethrown for Service Bus dead-lettering.
Limitations
- File Type Supported only PDF.
TO-BE: Future Changes
Overview
The direct blob upload from document-splitter will be replaced by delegating file storage to the file-intake service. Document-splitter will call file-intake’s upload endpoint for each split file, and file-intake is responsible for storing the blob and generating a FileId. Document-splitter then publishes the split file event (including the FileId) to the Service Bus.
Updated Flow
Current Implementation and To-Be
Updated Output Event – FileSplitFileEvent
Current
To-Be
file-intake Integration
- Endpoint:
POST /files/child/upload(file-intake service, NEW Endpoint) - Request: multipart or binary body containing the split PDF buffer
- Response:
{ fileId: string, internalUrl: string, hashValue: string } - One HTTP call is made per split file; document-splitter awaits the response before publishing the event.
- If the file-intake call fails, a
ProblemEventis published and the error is rethrown (same error handling as today).