Skip to content
This repository has been archived by the owner on Feb 7, 2025. It is now read-only.

621: Implement check for linked orders/results #988

Merged
merged 92 commits into from
Apr 16, 2024

Conversation

basiliskus
Copy link
Contributor

@basiliskus basiliskus commented Mar 29, 2024

Implement check for linked orders/results

  • Created MessageLink as an abstraction of message links
  • Check for messages to link given a received submission id. Use partner metadata (placerOrderNumber, sendingApplicationId and sendingFacilityId) to match to other submissions
    • If there's no match, don't create a link
    • If there's a match and there's an existing message link, add submission id to link
    • If there's a match and there's no existing message link, create a new link with the matched submission ids

Issue

#621

Checklist

  • I have added tests to cover my changes
  • I have added logging where useful (with appropriate log level)
  • I have added JavaDocs where required
  • I have updated the documentation accordingly

@basiliskus basiliskus changed the base branch from main to story-621-save_new_metadata March 29, 2024 16:55
@basiliskus basiliskus changed the title Implement check for linked orders/results 621: Implement check for linked orders/results Mar 29, 2024
basiliskus and others added 22 commits April 1, 2024 10:34
…, added initial implementation for FileMessageLinkStorage class
… methods in PartnerMetadataOrchestrator and SendOrderUseCase
@basiliskus basiliskus marked this pull request as ready for review April 12, 2024 21:41
Copy link
Member

@halprin halprin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More comments.

* This class represents a link between messages. Each link has a unique ID and is associated with a
* set of message IDs to link.
*/
public final class MessageLink {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thoughts on making this a record?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if it makes sense here as we need to manage state for message ids. It's not supposed to be immutable

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. What remains immutable is the reference to the Set object, but you can modify the contents of the Set itself.

Copy link
Member

@halprin halprin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks really good!

Copy link

@basiliskus basiliskus requested a review from halprin April 16, 2024 00:00
Copy link
Member

@halprin halprin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet! Great changes to the PostgresDao and thanks for moving the logic for reading the links out of the PostgresDao. That will make it easier to migrate once my PR is merged.

@basiliskus basiliskus merged commit 3512028 into main Apr 16, 2024
15 checks passed
@basiliskus basiliskus deleted the story/621/check-link-exists branch April 16, 2024 14:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants