AMP-504 Forward rawPayload from File Service in PCR subscription notification#311
Merged
Conversation
…riever Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… bug Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…egisterV2 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
coling01
reviewed
May 19, 2026
coling01
approved these changes
May 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JIRA
AMP-504
What changed
FileService.java: injectedFileRetrieveralongside existingFileStorer; addedretrievePayload(UUID)method that reads the stored JSON payload back from File ServicePcrEventPayload.java: addedMap<String, Object> rawPayloadfield to the Lombok builder DTOHearingResultsDocumentSubscriptionPCRMapper.java: updatedmapPcrForhearingResultsDocumentto 4-arg signature acceptingrawPayload; fixed pre-existing bug wheretimestampwas always set toInstant.now()instead of thecreatedAtparameterPrisonCourtRegisterEventProcessor.java: injectedObjectMapper; insendPrisonCourtRegisterV2()now fetchesrawPayloadfrom File Service viafileService.retrievePayload(fileId)before calling the mapper; falls back to the v2 event JSON itself if File Service returns emptyFileServiceTest(+2 retrieve tests),HearingResultsDocumentSubscriptionPCRMapperTest(updated to 4-arg + 2 new tests),PrisonCourtRegisterEventProcessorTest(all V2 tests updated to 4-arg + 2 new rawPayload assertion tests)Why it's needed
The downstream subscription service (
service-cp-crime-hearing-results-document-subscription) requires arawPayloadfield on inboundEventPayloadPOSTs so consumers can retrieve the full PCR source data viaGET /notifications/{notificationId}/payload. ThemappedPayloadis already stored in File Service bygeneratePrisonCourtRegister()and itsfileIdis carried in everyprison-court-register-generated-v2event — this change wires up the retrieval with no event store, schema, or aggregate changes.🤖 Generated with Claude Code