-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/#1334 patch request notif (#230)
* added diagrams for transfer reject flow for spec v1.1 * added some clarification text * added md for the reject/abort sequence * added changes to SUMMARY.md * link errors * added documentation for v1.1 for request notification functionallity * fixed typo in file name * added alternative messages for reserve and commit put request from payee * added notification on 'reserve' action * bumped up version * Update mojaloop-technical-overview/central-ledger/assets/diagrams/sequence/seq-fulfil-2.1.0-v1.1.plantuml Co-authored-by: Sam <10507686+elnyry-sam-k@users.noreply.github.com> * Update mojaloop-technical-overview/central-ledger/assets/diagrams/sequence/seq-fulfil-2.1.0-v1.1.plantuml Co-authored-by: Sam <10507686+elnyry-sam-k@users.noreply.github.com> * Update mojaloop-technical-overview/central-ledger/assets/diagrams/sequence/seq-fulfil-2.1.1-v1.1.plantuml Co-authored-by: Sam <10507686+elnyry-sam-k@users.noreply.github.com> * contributor name added * added contributor name to list * added contributor name to list * Updated SUMMARY.md * Fixed typo Co-authored-by: Valentin <valentin.genev@modusbox.com> Co-authored-by: Sam <10507686+elnyry-sam-k@users.noreply.github.com>
- Loading branch information
1 parent
f16584e
commit 6dbf236
Showing
15 changed files
with
1,083 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
207 changes: 207 additions & 0 deletions
207
...technical-overview/central-ledger/assets/diagrams/sequence/seq-fulfil-2.1.0-v1.1.plantuml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,207 @@ | ||
/' | ||
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> | ||
* Valentin Genev <valentin.genev@modusbox.com> | ||
-------------- | ||
'/ | ||
|
||
|
||
@startuml | ||
' declate title | ||
title 2.1.0. DFSP2 sends a Fulfil Success Transfer request v1.1 | ||
|
||
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 | ||
alt Send back notification reserve request | ||
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>, | ||
"transferState": "RESERVED" | ||
"extensionList": { | ||
"extension": [ | ||
{ | ||
"key": <string>, | ||
"value": <string> | ||
} | ||
] | ||
} | ||
} | ||
end note | ||
else Send back commit request | ||
|
||
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": "COMMITTED" | ||
"extensionList": { | ||
"extension": [ | ||
{ | ||
"key": <string>, | ||
"value": <string> | ||
} | ||
] | ||
} | ||
} | ||
end note | ||
end | ||
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-v1.1.svg 2.1.1-v1.1]]} \n | ||
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 == 'reserve' | ||
||| | ||
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 |
Oops, something went wrong.