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

Feature/#1334 patch request notif #230

Merged
merged 25 commits into from
Jul 6, 2020
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
0090935
added diagrams for transfer reject flow for spec v1.1
Jun 11, 2020
b71e649
Merge branch 'master' into feature/#1335-Aborted-on-PUT
elnyry-sam-k Jun 11, 2020
11f4d62
added some clarification text
Jun 11, 2020
07fc6b8
Merge branch 'feature/#1335-Aborted-on-PUT' of github.com:vgenev/docu…
Jun 11, 2020
386d6fc
Merge branch 'master' into feature/#1335-Aborted-on-PUT
elnyry-sam-k Jun 11, 2020
9026527
added md for the reject/abort sequence
Jun 12, 2020
c974b15
Merge branch 'feature/#1335-Aborted-on-PUT' of github.com:vgenev/docu…
Jun 12, 2020
5bcfef7
added changes to SUMMARY.md
Jun 15, 2020
e72ff69
link errors
Jun 15, 2020
4703f1a
Merge branch 'master' of github.com:mojaloop/documentation into featu…
Jun 22, 2020
3453c66
added documentation for v1.1 for request notification functionallity
Jun 22, 2020
3e555cb
fixed typo in file name
Jun 22, 2020
c6f30c2
added alternative messages for reserve and commit put request from payee
Jun 23, 2020
07ca261
added notification on 'reserve' action
Jun 23, 2020
57b4d44
Merge branch 'master' of github.com:mojaloop/documentation into featu…
Jun 26, 2020
a85f8d4
bumped up version
Jun 26, 2020
4e2a577
Update mojaloop-technical-overview/central-ledger/assets/diagrams/seq…
vgenev Jun 26, 2020
521106f
Update mojaloop-technical-overview/central-ledger/assets/diagrams/seq…
vgenev Jun 26, 2020
9f34811
Update mojaloop-technical-overview/central-ledger/assets/diagrams/seq…
vgenev Jun 26, 2020
c93998c
contributor name added
vgenev Jun 26, 2020
98852fa
added contributor name to list
vgenev Jun 26, 2020
06866d3
added contributor name to list
vgenev Jun 26, 2020
d79fce7
Updated SUMMARY.md
vgenev Jun 26, 2020
47d72aa
Fixed typo
vgenev Jun 26, 2020
8607083
Merge branch 'master' into feature/#1334-patch-request-notif
elnyry-sam-k Jul 6, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,17 @@
* [Prepare Handler Consume (a)](mojaloop-technical-overview/central-ledger/transfers/1.1.1.a-prepare-handler-consume.md)
* [Prepare Handler Consume (b)](mojaloop-technical-overview/central-ledger/transfers/1.1.1.b-prepare-handler-consume.md)
* [Prepare Position Handler](mojaloop-technical-overview/central-ledger/transfers/1.3.0-position-handler-consume.md)
* [Prepare Position Handler v1.1](mojaloop-technical-overview/central-ledger/transfers/1.3.0-position-handler-consume-v1.1.md)
* [Prepare Position Handler](mojaloop-technical-overview/central-ledger/transfers/1.3.1-prepare-position-handler-consume.md)
* [Position Handler Consume (a)](mojaloop-technical-overview/central-ledger/transfers/1.1.2.a-position-handler-consume.md)
* [Position Handler Consume (b)](mojaloop-technical-overview/central-ledger/transfers/1.1.2.b-position-handler-consume.md)
* [Fulfil Handler](mojaloop-technical-overview/central-ledger/transfers/2.1.0-fulfil-transfer-request.md)
* [Fulfil Handler v1.1](mojaloop-technical-overview/central-ledger/transfers/2.1.0-fulfil-transfer-request-v1.1.md)
* [Fulfil Handler Consume](mojaloop-technical-overview/central-ledger/transfers/2.1.1-fulfil-handler-consume.md)
* [Fulfil Handler Consume v1.1](mojaloop-technical-overview/central-ledger/transfers/2.1.1-fulfil-handler-consume-v1.1.md)
* [Fulfil Position Handler](mojaloop-technical-overview/central-ledger/transfers/1.3.0-position-handler-consume.md)
* [Fulfil Position Handler](mojaloop-technical-overview/central-ledger/transfers/1.3.2-fulfil-position-handler-consume.md)
* [Fulfil Position Handler v1.1](mojaloop-technical-overview/central-ledger/transfers/1.3.2-fulfil-position-handler-consume-v1.1.md)
* [Fulfil Reject Transfer](mojaloop-technical-overview/central-ledger/transfers/2.2.0-fulfil-reject-transfer.md)
* [Fulfil Reject Transfer (a)](mojaloop-technical-overview/central-ledger/transfers/2.2.0.a-fulfil-abort-transfer.md)
* [Fulfil Handler (Reject-Abort)](mojaloop-technical-overview/central-ledger/transfers/2.2.1-fulfil-reject-handler.md)
Expand All @@ -70,6 +74,7 @@
* [Fulfil Handler (Reject-Abort) v1.1](mojaloop-technical-overview/central-ledger/transfers/2.2.1-fulfil-reject-handler-v1.1.md)
* [Notifications]()
* [Notification to Participant (a)](mojaloop-technical-overview/central-ledger/transfers/1.1.4.a-send-notification-to-participant.md)
* [Notification to Participant (a) - v1.1](mojaloop-technical-overview/central-ledger/transfers/1.1.4.a-send-notification-to-participant-v1.1.md)
* [Notification to Participant (b)](mojaloop-technical-overview/central-ledger/transfers/1.1.4.b-send-notification-to-participant.md)
* [Reject/Abort]()
* [Abort Position Handler](mojaloop-technical-overview/central-ledger/transfers/1.3.3-abort-position-handler-consume.md)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
/'
License
--------------
Copyright © 2017 Bill & Melinda Gates Foundation
The Mojaloop files are made available by the Bill & Melinda Gates Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Contributors
--------------
This is the official list of the Mojaloop project contributors for this file.
Names of the original copyright holders (individuals or organizations)
should be listed with a '*' in the first column. People who have
contributed from an organization can be listed under the organization
that actually holds the copyright for their contributions (see the
Gates Foundation organization for an example). Those individuals should have
their names indented and be marked with a '-'. Email address can be added
optionally within square brackets <email>.
* Gates Foundation
- Name Surname <name.surname@gatesfoundation.com>

* Georgi Georgiev <georgi.georgiev@modusbox.com>
vgenev marked this conversation as resolved.
Show resolved Hide resolved
--------------
'/


@startuml
' declate title
title 2.1.0. DFSP2 sends a Fulfil Success Transfer request

autonumber
' Actor Keys:
' boundary - APIs/Interfaces, etc
' collections - Kafka Topics
' control - Kafka Consumers
' entity - Database Access Objects
' database - Database Persistance Store

' declare actors
actor "DFSP1\nPayer" as DFSP1
actor "DFSP2\nPayee" as DFSP2
boundary "ML API Adapter" as MLAPI
control "ML API Notification Event Handler" as NOTIFY_HANDLER
boundary "Central Service API" as CSAPI
collections "topic-fulfil" as TOPIC_FULFIL
control "Fulfil Event Handler" as FULF_HANDLER
collections "topic-\nsettlement-model" as TOPIC_SETMODEL
control "Settlement Model\nHandler" as SETMODEL_HANDLER
collections "topic-\ntransfer-position" as TOPIC_TRANSFER_POSITION
control "Position Handler" as POS_HANDLER
collections "topic-\nnotification" as TOPIC_NOTIFICATIONS

box "Financial Service Providers" #lightGray
participant DFSP1
participant DFSP2
end box

box "ML API Adapter Service" #LightBlue
participant MLAPI
participant NOTIFY_HANDLER
end box

box "Central Service" #LightYellow
participant CSAPI
participant TOPIC_FULFIL
participant FULF_HANDLER
participant TOPIC_SETMODEL
participant SETMODEL_HANDLER
participant TOPIC_TRANSFER_POSITION
participant POS_HANDLER
participant TOPIC_NOTIFICATIONS
end box

' start flow
activate NOTIFY_HANDLER
activate FULF_HANDLER
activate SETMODEL_HANDLER
activate POS_HANDLER
group DFSP2 sends a request for notification after tranfer is being committed in the Switch
DFSP2 <-> DFSP2: Retrieve fulfilment string generated during\nthe quoting process or regenerate it using\n**Local secret** and **ILP Packet** as inputs
note right of DFSP2 #yellow
Headers - transferHeaders: {
Content-Length: <Content-Length>,
Content-Type: <Content-Type>,
Date: <Date>,
X-Forwarded-For: <X-Forwarded-For>,
FSPIOP-Source: <FSPIOP-Source>,
FSPIOP-Destination: <FSPIOP-Destination>,
FSPIOP-Encryption: <FSPIOP-Encryption>,
FSPIOP-Signature: <FSPIOP-Signature>,
FSPIOP-URI: <FSPIOP-URI>,
FSPIOP-HTTP-Method: <FSPIOP-HTTP-Method>
}

Payload - transferMessage:
{
"fulfilment": <IlpFulfilment>,
"completedTimestamp": <DateTime>,
"transferState": "RESERVED" || "COMIITED"
elnyry-sam-k marked this conversation as resolved.
Show resolved Hide resolved
"extensionList": {
"extension": [
{
"key": <string>,
"value": <string>
}
]
}
}
end note
DFSP2 ->> MLAPI: PUT - /transfers/<ID>
activate MLAPI
MLAPI -> MLAPI: Validate incoming token and originator matching Payee\n<color #FF0000><b>Error codes:</b> 3000-3002, 3100-3107</color>
note right of MLAPI #yellow
Message:
{
id: <ID>,
from: <transferHeaders.FSPIOP-Source>,
to: <transferHeaders.FSPIOP-Destination>,
type: application/json,
content: {
headers: <transferHeaders>,
payload: <transferMessage>
},
metadata: {
event: {
id: <uuid>,
type: fulfil,
action: reserve || commit,
createdAt: <timestamp>,
state: {
status: "success",
code: 0
}
}
}
}
end note
MLAPI -> TOPIC_FULFIL: Route & Publish Fulfil event for Payee\n<color #FF0000><b>Error code:</b> 2003</color>
activate TOPIC_FULFIL
TOPIC_FULFIL <-> TOPIC_FULFIL: Ensure event is replicated as configured (ACKS=all)\n<color #FF0000><b>Error code:</b> 2003</color>
TOPIC_FULFIL --> MLAPI: Respond replication acknowledgements have been received
deactivate TOPIC_FULFIL
MLAPI -->> DFSP2: Respond HTTP - 200 (OK)
deactivate MLAPI
TOPIC_FULFIL <- FULF_HANDLER: Consume message
ref over TOPIC_FULFIL, TOPIC_TRANSFER_POSITION: Fulfil Handler Consume (Success) {[[https://github.com/mojaloop/documentation/tree/master/mojaloop-technical-overview/central-ledger/assets/diagrams/sequence/seq-fulfil-2.1.1.svg 2.1.1]]} \n
vgenev marked this conversation as resolved.
Show resolved Hide resolved
FULF_HANDLER -> TOPIC_SETMODEL: Produce message
FULF_HANDLER -> TOPIC_TRANSFER_POSITION: Produce message
|||
TOPIC_SETMODEL <- SETMODEL_HANDLER: Consume message
ref over TOPIC_SETMODEL, SETMODEL_HANDLER: Settlement Model Handler Consume (Success)\n
|||
TOPIC_TRANSFER_POSITION <- POS_HANDLER: Consume message
ref over TOPIC_TRANSFER_POSITION, TOPIC_NOTIFICATIONS: Position Handler Consume (Success)\n
POS_HANDLER -> TOPIC_NOTIFICATIONS: Produce message
|||
TOPIC_NOTIFICATIONS <- NOTIFY_HANDLER: Consume message
opt action == 'commit'
|||
ref over DFSP1, TOPIC_NOTIFICATIONS: Send notification to Participant (Payer)\n
NOTIFY_HANDLER -> DFSP1: Send callback notification
end
|||
TOPIC_NOTIFICATIONS <- NOTIFY_HANDLER: Consume message
opt action == 'commit'
|||
ref over DFSP2, TOPIC_NOTIFICATIONS: Send notification to Participant (Payee)\n
NOTIFY_HANDLER -> DFSP2: Send callback notification
end
|||
end
deactivate POS_HANDLER
deactivate FULF_HANDLER
deactivate NOTIFY_HANDLER
@enduml
Loading