| Subscription to classified-file events | Receives FileClassifiedEvent messages from the classified-file Azure Service Bus topic |
| PDF downloading | Fetches the original PDF from Azure Blob Storage using the URL provided in the event |
| Classification metadata downloading | Fetches the JSON classification output from Azure Blob Storage |
| PDF page-range validation | Ensures classification data is internally consistent (page counts, range boundaries, overlaps) |
| PDF splitting | Uses pdf-lib to extract per-form page ranges into separate PDF buffers |
| Child-file uploading | Uploads each split PDF to the file-intake service, which assigns each file a new fileId and stores it in blob storage |
| split-file event publishing | Publishes one FileSplitFileEvent per split file to the split-file topic |
| Split manifest creation | Generates a JSON manifest listing all split files and uploads it to the splits blob container |
| split-file-result event publishing | Publishes one FileSplitFileResultEvent (the manifest summary) to the split-file-result topic |
| Error / problem event publishing | On any failure, publishes a ProblemEvent to the problem topic so the platform’s status service can track failures |
| Job status tracking | Records a job row in the SQL database with status Started → Completed (or Failed) and the manifest blob URL |