Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SDK Scheme adapter] Add bulk Quotes calls (Steps 32-57) #2802

Closed
51 of 79 tasks
PaulGregoryBaker opened this issue Jul 1, 2022 · 0 comments
Closed
51 of 79 tasks

[SDK Scheme adapter] Add bulk Quotes calls (Steps 32-57) #2802

PaulGregoryBaker opened this issue Jul 1, 2022 · 0 comments
Assignees
Labels
core-dev-squad oss-bulk Mojaloop bulk implementation and support oss-core This is an issue - story or epic related to a feature on a Mojaloop core service or related to it story

Comments

@PaulGregoryBaker
Copy link

PaulGregoryBaker commented Jul 1, 2022

As a DFSP connected to Mojaloop
I would like to use the bulk transfers use case
So that I can integrate bulk load disbursement calls with my core banking system

Note:
The automation tests used to test this functionality in CICD and deployment, should use TTK as core connector/CBS simulator.
This story has been split, so that it only covers the outbound changes. The inbound changes have been added to story #2905

Limitations
This story covers flows steps in 32 - 57 in the sequence diagram.
I.e. from the first PATCH with bulk accept party to the to Mojaloop Connector, to the PUT callback response with the bulk quote acceptance results when:

  • AutoAcceptParty is false,
  • AutoAcceptQuote is false,
  • synchronous is false, and
  • the Payee SDK-Scheme-Adpater config HasSupportForBulkQuotes = false HasSupportForBulkQuotes = true

Sequence Diagram
The sequence diagram of this design can be accessed here.

Detailed Design
The details of the design implementation are specified here

Acceptance Criteria

  • Verify that the Outgoing API’s are implemented in line with Epic design
    • PATCH /bulkTransactions/
    • PUT /bulkTransactions/
  • Verify that the Incoming API’s are implemented in line with above Epic design
    • Post /bulkquotes
    • PUT /bulkquotes callback@@
  • Verify that the POST /bulkquote call is split into n synchronous POST /quoterequests calls
  • Verify that the results for both happy and unhappy quote requests are consolidate and returned in the PUT /bulkquotes callback
  • Verify that the bulk transfers API error cases are implemented in the SDK Scheme Adapter
  • Verify that if a transfer is delayed by more than the bulk Expiration time are aborted
  • Verify that failed quotes abort the transfer with error
  • Verify that transfers for different Payee DFSP’s in the same bulk transfer message are supported
  • Verify that transfers that are marked as invalid are skipped and returned in the aborted transfers response list
  • Verify that the bulkExpiration is taken into account when setting quote expirations
  • Verify that automated CICD test are added to cover this functionality
  • Verify that the TTK is use to simulate the core connector
  • Verify that Kafka messages are use to ensure persistence, reliability with minimal duplication on failures.
  • Verify that the typescript message definitions are provided
  • Verify that persistent model is defined
  • Verify that Event handler rules are added to complete the flow as designed links above.
  • Verify the the Command handler is has commands added that as designed links above.
  • Verify that the Command handler has narrow integration tests
  • Verify that API Snippets are updated\added

Complexity: <High|Medium|Low> > A short comment to remind the reason for the rating

Uncertainty: <High|Medium|Low> > A short comment to remind the reason for the rating


Tasks:

  • Add steps from the overview sequence diagram into the detail Event Sourcing design e.g. Steps 32-39.
    • Command events
      • ProcessSDKOutboundBulkAcceptPartyInfo
        • Implementation
        • Integration Test Cases
      • ProcessSDKOutboundBulkQuotesRequest
        • Implementation
        • Integration Test Cases - In Progress @kleyow
      • ProcessBulkQuotesCallback
      • ProcessSDKOutboundBulkQuotesRequestComplete (This event is deleted in the sequence diagram. Ref PR)
    • Domain events
      • SDKOutboundBulkAcceptPartyInfoReceived
      • SDKOutboundBulkAutoAcceptPartyInfoRequested
      • SDKOutboundBulkAcceptPartyInfoProcessed
      • BulkQuotesRequested (This should be handled in api service, message format is specified as part of this story)
      • BulkQuotesCallbackReceived
      • BulkQuotesProcessed
      • SDKOutboundBulkAcceptQuoteRequested
    • Inbound command events (This work is moved to a new story mojaloop/2905)
      • ProcessInboundBulkQuotesRequest
      • ProcessInboundBulkQuotesRequestComplete
      • ProcessInboundBulkQuotesReponseSent
    • Inbound domain events
      • InboundBulkQuotesRequestReceived
      • SDKBulkQuotesRequested
      • SDKBulkQuotesCallbackReceived
      • InboundBulkQuotesRequestProcessed
      • InboundBulkQuotesReponseSent
  • Fix the following issues in API snippets library
    • The amount field in bulkQuotesRequest -> individualQuotes should be required field.
    • The expiration field is declared as required field in individualQuoteResults but there is no field in the definition at all.
    • There is no currentState in the bulkQuotesResult specification, but its there in the response.
    • The quoteId should be required field in the individualQuoteResponse. But it is optional now.
    • Current dfspInboundAPI is outdated and its better to add the core connector API to the API snippets library as single source of truth. Create a story for this.
    • POST /bulkTransaction has an optional bulkTransactionId in the body, yet the PUT /bulkTransaction/{bulkTransferId} . Thus the CBS would not have prior knowledge of the bulkTransferId ….thus the bulkTransferId (bulkTransactionId) should be required instead of optional on the POST?
    • Issue: Schema for Outbound API for homeTransactionId on Individual Transfers is not a generic string, but rather enforces UUID Regex pattern
  • define entity types
    • build the bulk batch transfer object
    • build the quotes model
  • Define message types
  • Define the aggregates and entities based on super classes
  • Extend interfaces for Redis repo with unit tests
  • Extend the event handler service; with switch statements based on Design above
  • Extend the command handler service
    • Add narrow integration tests for bulk quote handling in Command Handler Service (Sri) - In Progress
  • Outbound: Refactor backend API to consume Kafka topics for bulk @kirgene
    • implement PUT /bulkTransations/{bulkTransactionId} outbound for accept party
    • respond back with PUT /bulkTransactions/{bulkTransactionId} callback for accept quote
  • Inbound: Refactor backend API to consume Kafka topics for bulk @kirgene
    transfers
  • Outbound: Refactor FSPIOP API to publish / consume Kafka topics for bulk @kirgene
    • create the POST /bulkquotes request object
    • handle the response from the PUT /bulkquotes/{id} request
  • Inbound: (Payer DFSP) Refactor FSPIOP API to publish / consume Kafka topics for bulk @kirgene
    • handle the POST /bulkquotes request object
    • create the PUT /bulkquotes/{id} request with the results
  • Combine event handler, command handler, backend API and FSPIOP API @kirgene
  • Address duplication message event being sent due to redis increment @kleyow
  • handle the error cases
  • handle validation errors
  • write narrow integration tests

Done

  • Acceptance Criteria pass
  • Designs are up-to date
  • Unit Tests pass
  • Integration Tests pass
  • Code Style & Coverage meets standards
  • Changes made to config (default.json) are broadcast to team and follow-up tasks added to update helm charts and other deployment config.
  • TBD

Pull Requests:

Follow-up:

Dependencies:

  • N/A

Accountability:

  • Owner: TBC
  • QA/Review: TBC
@PaulGregoryBaker PaulGregoryBaker added story to-be-refined This story is ready to be groomed oss-bulk Mojaloop bulk implementation and support labels Jul 1, 2022
@elnyry-sam-k elnyry-sam-k added oss-core This is an issue - story or epic related to a feature on a Mojaloop core service or related to it core-dev-squad labels Jul 4, 2022
@PaulGregoryBaker PaulGregoryBaker removed the to-be-refined This story is ready to be groomed label Aug 12, 2022
@PaulGregoryBaker PaulGregoryBaker added the to-be-refined This story is ready to be groomed label Aug 31, 2022
vijayg10 added a commit to mojaloop/api-snippets that referenced this issue Sep 1, 2022
fix(mojaloop/2802): issues with sdk outbound specification found during the story [mojaloop/2802](mojaloop/project#2802)
  - The `amount` field in `bulkQuotesRequest` -> `individualQuotes` is made as required field.
  - The `expiration` field is removed in the list of required fields in `individualQuoteResults`, because there is no field in the definition at all.
  - Added `currentState` in the `bulkQuotesResult` specification.
  - Made `quoteId` as required field in the `individualQuoteResponse`
  - Made `bulkTransactionId` in `POST /bulkTransaction` as required
  - Changed the type of `homeTransactionId` in Individual Transfers to a generic string instead of UUID Regex pattern
@PaulGregoryBaker PaulGregoryBaker removed the to-be-refined This story is ready to be groomed label Sep 1, 2022
@kirgene kirgene assigned kirgene and unassigned kirgene Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-dev-squad oss-bulk Mojaloop bulk implementation and support oss-core This is an issue - story or epic related to a feature on a Mojaloop core service or related to it story
Projects
None yet
Development

No branches or pull requests

7 participants