Skip to content

NIAD-3432: Skeleton processing service now removes leading _ before performing XPath query#1257

Merged
chiaramapellimt merged 2 commits intomainfrom
NIAD-3432-2
Apr 7, 2026
Merged

NIAD-3432: Skeleton processing service now removes leading _ before performing XPath query#1257
chiaramapellimt merged 2 commits intomainfrom
NIAD-3432-2

Conversation

@chiaramapellimt
Copy link
Copy Markdown
Contributor

@chiaramapellimt chiaramapellimt commented Apr 2, 2026

What

This fix relates to this ticket: https://nhse-dsic.atlassian.net/browse/NIAD-3432
When processing large messages with a skeleton attachment, the adaptor takes the skeleton document ID from the ebXML reference and uses it to search for the matching node in the payload XML. However, EMIS and SystmOne both prefix their ebXML document IDs with a leading underscore, while the same ID appears without the underscore in the payload XML. This mismatch meant the XPath query never found a matching node, returning null and causing the NullPointerException and subsequent LARGE_MESSAGE_GENERAL_FAILURE.

Why

Strip the leading underscore from the document ID before executing the XPath query. This is a one-line change in SkeletonProcessingService.java and is safe for messages where the document ID has no leading underscore, as the operation is a no-op in that case.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Internal change (non-breaking change with no effect on the functionality affecting end users)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • I have performed a self-review of my code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have updated the Changelog with details of my change in the UNRELEASED section if this change will affect end users
  • A corresponding change has been made to the Mapping Documentation repository

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 2, 2026

Looks good. All 2 mutations in this change were killed.

class surviving killed
💯uk.nhs.adaptors.pss.translator.service.SkeletonProcessingService 0 2

See https://pitest.org

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 2, 2026

Images built and published to ECR using a Build Id of PR-1011-df2a18d

@chiaramapellimt chiaramapellimt marked this pull request as ready for review April 2, 2026 12:29
@chiaramapellimt chiaramapellimt requested a review from a team as a code owner April 2, 2026 12:29
@chiaramapellimt chiaramapellimt merged commit 72138b7 into main Apr 7, 2026
19 checks passed
@chiaramapellimt chiaramapellimt deleted the NIAD-3432-2 branch April 7, 2026 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants