Uploaded image for project: 'mod-entities-links'
  1. mod-entities-links
  2. MODELINKS-122

Implement sequence number generation mechanism for authority local files

    XMLWordPrintable

Details

    • 5
    • Spitfire
    • Quesnelia (R1 2024)
    • TBD

    Description

      Purpose
      To have the ability to securely track the current HRID state for each authority local file. We should implement sequence number generation mechanism.

      Approach

      1. New endpoint to catch-up authority current hrid information is presented

        POST: /authority-source-files/{id}/hrid

      Description: No request body. Endpoint should return current HRID value by authority file id and increment the next one.

      1. Extend AuthoritySourceFileHridManager to work with sequences
          - Create sequence for authority local file after validation (pattern: '{tenant}_hrid_authority_local_file_{prefix}_seq')
            See example hrid settings
          - Update sequence name for authority local file if prefix was updated
          - Drop sequence for authority local file after deletion
      1. Return hrid on request 
          - Retrieve next value from localFile sequence 
          - Format next value to NaturalId(HRID) format

      Acceptance criteria

      • Covered by unit tests
      • Module documentation updated
      • Logging is well-defined

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                Unassigned Unassigned
                Shans Shans Kaluhin
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                  Created:
                  Updated:

                  TestRail: Runs

                    TestRail: Cases