Skip to content

Commit 03ce76c

Browse files
author
Sam
authored
Merging master and develop (#116)
* Develop Merge to Master (#87) - Fri Oct 19th, 2018 * Initial Check In * Updates * Draft for Performance scenarios, metrics and other analytics information gathered as part of PI-1 * Minor spelling fix * Added hardware/config details of hosts * A sentence was incomplete, fixed it (#14) * Added sequence diagram for prepare flows Includes the following use-cases: 1. DFSP1 sends a Prepare Transfer request to DFSP2 2. Prepare Validation Failure 3. Prepare Position Failure * Added generated svg * Corrected position check failure * Fixed typo * fixed a duplicate, and added a comment indicate key usage for plantuml actor types * updated comments * Made things clearer and fixed callback request from MLAPI to CentralServices * typo * Moved prepare into 3 seperate files for easier readability * updated grammar and typos * Included messages between hops * Fixed topic names * added some additional metadata * added some additional metadata fields * wasnt using the Position DAO to retrieve the current position * Fixed typo in 1.3 * Updated flow with event persistance in error use-cases * Fixed some flow issues with notifications dap * Updated with Murthy's comments. * temp changes made during sprint discussion - create stories for: - create a story to determine best approach for DB Transactionality/Compensation/Validation Patterns - story to provide feedback-loop for callback response - story to do the caching of the notifications information - story to do the caching of "transfer settlement batch window id" - story to do the caching of "position" - story to to modify existing mojaloop api definition for settlements (deposits, withdrawals, and clearing notifications) - use cases to be added: - failure on "validates incoming token, and the originator matches DFSP1" - failure on "duplicate check" <-- need to conform to mojaloop <-- if there is an existing response that was not sent (then send 202), if it exists respond with response with existing message - to do: - colour co-ordinate the same boxes to the arch diagram - update sequence diagram to show batch processing - add "transfer settlement batch window id" to be handled by the position event handler - add persistence of the transfer to the position event handler - add update of transfer status to the transfer event handler - sequence diagrams for: - fullfill use-case - transfer timeout use-case * updated 1.1 and 1.2 with possible ML messages for successful prepare and failre validations * updated headers to be json * updated svgs for 1.1 and 1.2 * Updated SDs for 1.1, 1.2 & 1.3 * updated * changed alts to groups * simplified diagrams, and removed duplicated detail from 1.2 and 1.3 with reference to 1.1 * added batch flows * Initial Commit for Specification documents * Adding PKI Best Practices and JSON Binding Rules * Adding descriptions for PKI Best Practices and JSON Binding Rules and some markdown editing * Adding Logical Data Model and Generic Transaction Patterns * Adding supporting files section to include the Open API (Swagger) YAML and RAML files corresponding to the specification * Updated flows: 1.1 - based on Murthy's comments for the states for the prepare, and position handlers 1.2 - updated state to failure after prepare validation 1.3 - updated state to failure after position check validation * added additional validation for the amount * Moving the specification document set to a repo of its own "mojaloop-specification" * Review and brake into smaller reusable parts * Added end-to-end flow for 1.1.0 * Updated 1.1.1 1. events not publishes to topic 2. added database tables 3. added alt flow for validation success and failures on prepare flow * Fixed a typo, and added TOPIC_NOTIFICATIONS * Updates based on the Design Authority review updates mojaloop/project#213 * Updated prepareHandler to not update state to "aborted" if validations fail * Fixed some typos, and corrected the event publisher in 1.1.2a * Updated changes for PR review comments * removed unused code. * Updated diagram after code clean * Updated based on PR comments. * fixed flow for retrieval of position * Fixed comments from PR * Updated based on "last" comments * Updated positionHandler to cater for the retrieval of position limits for a payer participant * Fixed typo * Feature/#247 Design Fulfill (#19) Summary of changes: - 2.1.x - Fulfil Success (sequence diagrams) - 2.2.x - Fulfil Reject (sequence diagrams) - 2.3.x - Timeout (sequence diagrams) - use-case-position-handler (use case diagram) For additional details, please refer to: Story #247, 2.4.01.01 Design Fulfill [5] * Feature/#272 Implement Fulfil Handler Consume (Success) Lineup 2.1.1 to its code implementation (#20) * Data Diagrams Init Added central-ledger DB schema Added central-ledger DDL, generated by MySQLWorkbench > Server > Data Export * Feature/Diagrams Update - Sequence & Architecture (#22) * Fulfil Notify fix (#24) * Arch-Flows-End-to-End.png * adding mojaloop architecture static demo files (interim) (#23) * Acknoledgments typo corrected (#25) * seq diagrams http removal and golden path arch diagram edit (#28) * Feature/#341positionManagementDesign (#33) * Updated prepare handler for the pre-PI3-design for position handler * Updated the svg diagram for the previous commit. * Seq Fulfil Settlement Window and transferState update (#30) * Design meeting update (#29) * added new sequence diagrams for positions process * updated sequence diagrams for positions * added overall svg for positions * Updated to follow standards as per DA/Georgi * Update svg images to reflect updated plantUML * Design Workshop Day 3 - Part 1 changes * Design Workshop Day 4 - Part 1 changes * changes for georgi to review * Temp 6/26 * Merge rmothilal * Design day 5, Part 1 - Transfer Neg. * Initial changes * Day 2 design changes * Day 3 design changes * Day 4 design changes * Day 4 design changes (cont.) * PR suggested change by Sam * added seq diagram for participant callback details (#34) * added seq diagram * updated the sequence diagram for get and added for create endpoint * updated the error codes * updated the sequence diagrams as per DA review * updated the sequence diagrams as per DA review * Minor changes while implementing migration scripts (#35) * Sequence diagrams for "API to Query FSP Positions" (#36) * adding mojaloop architecture static demo files (interim) * Added Sequence diagrams for "API to Query FSP Positions", story #331 - mojaloop/project#331 * Added the YAML file as well to document the proposal for the Data Model. ( Changes: GET /positions: GET /positions/{name}: Under Definitions: Amount DateTime FspId Money IndividualPosition PositionsNameGetResponse PositionsGetResponseForHub ) * Changes based on Warren's PR comments: 1. Updated Data Model to add a new item SinglePosition instead of Money that has value, reservedValue along with Currency. 2. Updated examples in the YAML accordingly 3. Updated 4.1.0 plantuml (and svg) to include participantCurrency in Step-9 and added the line "Use participant-<participantCurrency-<participantPosition lookup"; Updated Message to include reservedValue 4. Updated 4.2.0 plantuml (and svg) to include reservedValue in the Message * Changes based on Warren's comments - updated 'timestamp' in Position detail to 'lastUpdated'.. Changed DataModel to add timestamp for GET requests - added 'respondedAt' to record the time when the response was sent. * Changes based on Miguel's comments for the PR. (1. Updated 'fspId' to 'participantId', 2. Added 'lastUpdated' timestamp to Position Object instead of adding it separately outside, 3. Changed 'PositionsGetResponseForHub' to 'PositionsGetResponse', 4. Changed 'fspPositionsInSwitch' to 'positions' * Updates based on Rajiv's, Miguel's comments (Changed ParticipantHandler to PositionHandler) * After discussion with Miguel, changed back to ParticipantHandler (from PositionHandler) after changing the resources from /positions to /participants/positions and /positions/{name} to /participants/{name}/positions. Also, updated Swagger YAML to include only the positions end-points for clarity. * Separate participant sequence diagrams (#37) * adding mojaloop architecture static demo files (interim) * Removing the 'print' files (used for printing for onsite meetings) and moving participant related Sequence diagrams to a separate folder * first draft API Design (swagger and sequence diagram) for maintaining the participantLimit * renamed extensions and created SVG file for sequence diagram * synchronised naming conventions. * minor tweaks in comments and title * updated svg diagram to reflect latest changes in plantuml file. * added "currencyId" to the return payload and made the amount fields string with a regex defining a proper amount. * added sequence diagram for participant limits and initial position (#40) * added sequence diagram for participant limits and initial position * modified the diagram after review * made some changes regarding exiting position/limits * Feature/#285 handling duplicate prepares (#42) * adding mojaloop architecture static demo files (interim) * Moving all participant related flows into a single folder * No major changes. A single comment about optimizing duplicate checks (try an insert first and handle an error in insertion for the duplicate and send either an error or a notification where necessary) * Updating the SVG * Added text to indicate the case of a request for which the processing is not complete in duplicate analysis * Feature/#304 design notification handler for rejections (#45) * Design Notification Handler for Rejections - v1.0 * Create Notification Reject UML process. v2.0 * Update Sequence diagram as per Sam recommendations. v3.0 * Update event 5 from solid line to dotted as per Sam's recommedation. v4.0 * Update as per Miguel's request to include ref to 9.1.0 - Event Handler * Included rejections for 'timeout' events as per request from Miguel. * Included the rejected actions as requested and 'cosmetic' updates. v5.0 * Removed sequence diagram that is not part of this feature. * sequence diagram for NET_DEBIT_CAP management (#46) * added the sequence diagrams for participant limits * added the return object for post * Removed swagger for manage_participant_limit.yaml as its being generated by the central-ledger * Feature/#303 Design Timeout DAO layer and flow (#47) * Outcome of story #303 * Spelling corrections * rmothilal suggested changes and spell checker * Feature/#300 event logging framework placeholder (#50) * adding mojaloop architecture static demo files (interim) * Initial commits for Event Handler placeholder design (minor change for prepare to publish duplicate to event topic) * Updates based on Rajiv's comments * Added a schema for the Message for the Event Handler (placeholder); focus being on the 'type' and 'action', which can be used to determine how the events should be handled. * Update to change a couple of values to Upper case based on Miguel's suggestion * Minor corrections (#51) * Feature/317 design position management (#38) * transfer fulfil and position fulfil * updated svg diagrams * abort processes * abort process * changes as per georgi and miguel * added validate signiture * added place holder for validation of the FSIOP_SIGNATURE into its own diagram * updated svg * PR Review ggrg & rmothilal * removal of duplicate sequence diagram * updates as per request from PR * position prepare flow diagram * changes required for commit * updated svg diagrams * updated as per sam's request * Adding step to publish event when a duplicate is identified * Updating the SVG based on the earlier change in the plantuml file * Minor change in updating number sequence (duplicate step 2's) * Updated position-prepare to reflect revision of algorithm While using the single DB transaction model (have left comments for reverting to a 2 DB transaction model in the future) Note, that from the review there will be a few changes to the code - in particular the runningReservedValue calculation, and the handling of errors when not in the expected state. In general, need to check that handler interrupts errors correctly or that they are stored and passed back from the fascade. * Added error codes for Step-3 in seq-position-1.3.1-prepare.plantuml (which was a ? earlier). Updated the corresponding SVG and PNG files as well * Moving PNG files to archive folder * Incorporated feedback based on Georgi's comments and Warren's questions * Feature/#309 Prepare Duplicate Check (#57) * Minor corrections * Add transferError table * Feature/#393 Design Timeout Handler (#54) * Minor corrections * Delivered by #301 * Finilise design * Clean up and update diagrams that follow 2.3.1 * Update overall diagram * Changes requested by DA Authority * Changes requested during review with wdcmb * Appending states to list for inclusion * Updating list of states * Feature/#332 Settlement Processing DB Design (#52) * Minor corrections * DB Model and DDL * Clean up requested by Shashi * Feature/#309 updates to duplicate handling prepares (#56) * adding mojaloop architecture static demo files (interim) * Changes to Duplicate handling on prepares; Major change being persisting to the transfer (& related) DBs even when validation fails. Another change is persisting hash at the beginning if it doesn't exist in the transferDuplicateCheck table. * Change made to introduce new status "INVALID" (internal) to mark entries where validations fail in Prepare Handler * Removed the note (as it is outdated now) and added 'transferError' table so that errors can be persisted when Validation fails * Made changes to structure, expanded in some places and correctly placed alternate flows, etc - based on Georgi's comments * Changes based on Georgi's review comments (mostly for clarity and formatting) * Added template for stories * Feature/#409 Bug Template (#58) * adding mojaloop architecture static demo files (interim) * Adding a bug template to the Standards folder * Added possible values for Severity and Priority based on Miguel's suggestion * Renamed.. (change from PR suggestion) * Feature/#409 bug template enhancement (#61) * Changes to bug template to adjust flow (Miguel's review) * Renamed this to Template_Bug.md * feature/#411 Database Changes (#64) * Added settlementTransferParticipant.settlementWindowId column * Added currentStatePointer table * Added stateChangeId reference to main settlement tables * FKs renamed to currentStateChangeId * Feature/#411 Design Settlement Processing (#65) * Design Notification Handler for Rejections - v1.0 * Create Notification Reject UML process. v2.0 * Update Sequence diagram as per Sam recommendations. v3.0 * Update event 5 from solid line to dotted as per Sam's recommedation. v4.0 * Update as per Miguel's request to include ref to 9.1.0 - Event Handler * Included rejections for 'timeout' events as per request from Miguel. * Included the rejected actions as requested and 'cosmetic' updates. v5.0 * Removed sequence diagram that is not part of this feature. * Settlement process commit - initial v1.1 * Sequence diagrams for settlementWindow 'GET:: getSettlementWindowById' 'PUSH:: closeSettlementWindow' operations v1.0. * Commit sequence diarams so implementations can start. v2.0 * Removed unused actors and included note to "lock" table for "read" during the status update process - v3.0. * Update for pull request #55 - as requested by @georgi - v5.1 * Feature/#333 Design Settlements (#55) * feature/#333DesignSettlementProcessing (#55). Update diagram names to align with Story. - v5.2 * feature/#333DesignSettlementProcess - PUT * feature/#333DesignSettlementProcessing - GET v5.2 * feature/#333DesignSettlementProcessing - update seq 6.2.5 v5.3 * feature/#333DesignSettlementProcessing - update seq 6.2.5 v5.4 * Update 6.2.5. * Changes with Warren * Adding current state variables and init * Feature/#411DesignSettlementProcessing - synch change to new feature - v1.0 * NOT_SETTLED from account to window not possbile * 6.2.5 for DA review * Update opt for settlementStateChange * Adding sample response types * Feature/#411DesignSettlementProcessing - v1.1 * An annotation and a check * 6.1.2. Review w/ corrections * Add settlementTransferParticipant.settlementWindowId column * Query settlementTransferParticipant for window * Feature/#411DesignSettlementProcessing - updates as per Georgi. * Review 6.1.1. w/ changes and slight modifications to 6.1.2. and 6.2.1. * Update diagram titles * Fixing typos in 6.2.5. * Reset data_diagrams to previous version * Update 6.1.1. * Update 6.1.2. * Update 6.1.3. * 6.2.1. - work in progress * Switched from currentStatePointer table to currentStateId column * Finished 6.2.1. * Updated 6.2.5. * Renamed 6.2.0. to 6.2.2. and settleWindow to setwindow * Finished 6.2.4. * Finished 6.2.3. * Minor addition to 6.2.3. * Changes during DA review * Finished 6.2.2. * Feature/#314#320 Timeout Handler Implementation (#68) * Minor corrections to the design * Updated 1.3.3. timeout-reserved to notification topic * Updated diagrams for PI3 * Feature/429-fix-bug69-docs-prepare1.1.1a (#71) * Fixes for bug: https://github.com/mojaloop/docs/issues/69. 1. Updated typos, 2. Added Data Model for message with new action type "prepare-duplicate" 3. Elaborated steps for this scenario * Made change to include a sample payload as per Sashi's suggestion (for transfer response on duplicate). * Corrections during implementation of 6.2.2. (#73) * Feature/430 align issues with names (#74) * Fix for bug 430 - aligning names in titles, etc * Feature/439 Fix updateSettlementById (#75) * Allign 6.2.5. to implementation * Added FOR UPDATE * Feature/443 Add Hyperlinks To Seq Diagrams (#76) * Allign 6.2.5. to implementation * Added FOR UPDATE * Added hyperlinks * Sequence diagram for get positions API story #404 (#77) * sequence diagram for get positions API * updated the existing seq diagram and deleted the new duplicate * Included presentation for PI3 Convening for Deployment & Setup Introduction * Feature/461 Settlement Transfer (#81) * Added settlement accounts and seeds * Added settlementTransferId column * Added DBeaver ER diagram * Multiple accounts & signed amounts * Settlement Transfer Prepare sequence diagram * Settlement Transfer Commit (Draft) * Update 6.3.1 & 6.3.2 * Added note for transverExtension * DA Review Changes * Removed last two slides. * Feature/#478 removing transfer handler - updating designs (#83) * Updating architecture diagrams to reflect the removal of Transfer Handler * Feature/#358 support currency (#84) * Develop (#15) * Initial Check In * Updates * Draft for Performance scenarios, metrics and other analytics information gathered as part of PI-1 * Minor spelling fix * Added hardware/config details of hosts * A sentence was incomplete, fixed it (#14) * updated grammar and typos * Initial Commit for Specification documents * Adding PKI Best Practices and JSON Binding Rules * Adding descriptions for PKI Best Practices and JSON Binding Rules and some markdown editing * Adding Logical Data Model and Generic Transaction Patterns * Adding supporting files section to include the Open API (Swagger) YAML and RAML files corresponding to the specification * Initial draft by Michael Signed-off-by: adrianhopebailie <[email protected]> * Fix tables Signed-off-by: adrianhopebailie <[email protected]> * removed outdated content * Add files via upload * updated readme * Update README.md * updated readme * uploaded image * uploaded images * upload images * Uploaded images * Add files via upload * Delete Mojaloop Services Overview.png * Add files via upload * Delete Mojaloop Services Overview.png * Add files via upload * Initial commit for #358 * Feature/#358SupportCurrency - clarification. * Feature/#358SupportCurrency - Updated. * Feature/461 Settlement Transfer - Implementation specific changes (#85) * Added settlement accounts and seeds * Added settlementTransferId column * Added DBeaver ER diagram * Multiple accounts & signed amounts * Settlement Transfer Prepare sequence diagram * Settlement Transfer Commit (Draft) * Update 6.3.1 & 6.3.2 * Added note for transverExtension * DA Review Changes * Changes to the diagrams during the implementation * Label change * Realigning transfers arch (#86) * Slightly re-aligned transfers architecture, though all the components stay the same * Feature/#452 get transfers temporary solution phase2 (#88) * Interim work-around solution for GET /transfers as internally discussed * Update bug template (#89) * Adding severity and priority values when opened to have the log in the issue itself, without having to look at history. Removing specification documents here because now they have their own repo: mojaloop-specification * Minor formatting * Removed a duplicate for bug template (#90) * Removing duplicate template for bug * Removed 2 duplicate (outdated) files and Renamed files for relevance (#91) * Feature/#512Documentation Updates. * Feature/#512-Documentation * Pdf updates (#94) * Updated build scripts and files to build pdfs without errors or warnings Note this doesn't mean the info is correct, just that it builds correctly. * remove DFSP repos and corresponding images * fix developer onboarding docs build * update pdf files after clean build * md fixes for PDFs to match repository analysis * Add link to v0.3 and migrate Link to cross-network repo * Adding draft of presentation for day-1. Note that this is not final (#109) * uploaded Mifos Slides * GSMA lab slides * Mowali Slides * Mowali Slides 1 of 2 * Fintech Paraguay * Delete Mowali Update 270119 V 0_3.pdf need to remove for now * build a school * DFS Labs Intro * Add cross-border presentation * Business Rules and Interoperability * Updated version 1.2 of the presentation (#112) * Entity Mgmt Presentation * Build a School Presentation * Mowali Update * Security Presentation * Uploading the final presentation from Mojaloop Open Source phase3-kickoff event (#113) * Agile Training
1 parent db50ff4 commit 03ce76c

35 files changed

+258
-11616
lines changed

CentralLedger/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
## Transfer/Fulfillment Flow
88
![Transfer/Fulfillment sequence diagram](./central_ledger_sequence_transferfulfillment.png)
99
### Note
10-
Only transfers where a Payer’s currency is the same as a Payee’s currency are operational in this release; i.e., even though multi-currency is supported, cross-currency is not supported at this time. The Cross-currency transfers use case is currently being investigated.
10+
11+
Only transfers where a Payer's currency is the same as a Payee's currency are operational in this release; i.e., even though multi-currency is supported, cross-currency is not supported at this time. The Cross-currency transfers use case is currently being investigated.
1112

1213
## Settlement Flow
1314
![Settlement sequence diagram](./central_ledger_sequence_settlement.png)

Diagrams/SequenceDiagrams/seq-callback-3.1.0.plantuml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
title 3.1.0 Get Participant Callback Details
2828

2929
autonumber
30-
3130
' Actor Keys:
3231
' boundary - APIs/Interfaces, etc
3332
' collections - Kafka Topics

Diagrams/SequenceDiagrams/seq-callback-add-3.1.0.plantuml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@
2222
--------------
2323
******'/
2424

25+
2526
@startuml
2627
' declate title
2728
title 3.1.0 Add Participant Callback Details
2829

2930
autonumber
30-
3131
' Actor Keys:
3232
' boundary - APIs/Interfaces, etc
3333
' collections - Kafka Topics

Diagrams/SequenceDiagrams/seq-fulfil-2.1.0.plantuml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
title 2.1.0. DFSP2 sends a Fulfil Success Transfer request
2828

2929
autonumber
30-
3130
' Actor Keys:
3231
' boundary - APIs/Interfaces, etc
3332
' collections - Kafka Topics

Diagrams/SequenceDiagrams/seq-fulfil-2.1.3.plantuml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
title 2.1.3. Transfer Handler Consume (Success)
2828

2929
autonumber
30-
3130
' Actor Keys:
3231
' boundary - APIs/Interfaces, etc
3332
' collections - Kafka Topics
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
@startuml
2+
' declate title
3+
title 6.3.2. Settlement Transfer Commit
4+
autonumber
5+
6+
' declare actors
7+
entity "Settlement DAO" as SETTLE_DAO
8+
database "Central Store" as DB
9+
10+
box "Settlement Service" #lightgreen
11+
participant SETTLE_DAO
12+
end box
13+
14+
box "Central Services" #lightyellow
15+
participant DB
16+
end box
17+
18+
' start flow
19+
activate SETTLE_DAO
20+
group Settlement Transfer Commit
21+
note right of SETTLE_DAO #lightgray
22+
**Inputs**: settlementId that has just been SETTLED, transactionTimestamp, enums, trx
23+
end note
24+
SETTLE_DAO -> DB: Retrieve the list of RESERVED, but not COMMITTED
25+
activate DB
26+
hnote over DB #lightyellow
27+
SELECT tp.transferId, tp.participantCurrencyId, tp.amount
28+
FROM **settlementParticipantCurrency** spc
29+
JOIN **transferStateChange** tsc1
30+
ON tsc1.transferId = spc.settlementTransferId
31+
AND tsc1.transferStateId = {RESERVED}
32+
LEFT JOIN **transferStateChange** tsc2
33+
ON tsc2.transferId = spc.settlementTransferId
34+
AND tsc2.transferStateId = {COMMITTED}
35+
JOIN **transferParticipant** tp
36+
ON tp.transferId = spc.settlementTransferId
37+
AND tp.participantCurrencyId = spc.participantCurrencyId
38+
WHERE spc.settlementId = {settlementId}
39+
AND tsc2.transferId IS NULL
40+
end hnote
41+
DB --> SETTLE_DAO: Return **settlementTransferList**
42+
deactivate DB
43+
group <color #blue>DB TRANSACTION</color>
44+
loop t IN settlementTransferList
45+
SETTLE_DAO -> DB: Select participantPosition FOR UPDATE
46+
activate DB
47+
hnote over DB #lightyellow
48+
SELECT participantPositionId, value positionValue, reservedValue
49+
FROM **participantPosition**
50+
WHERE participantCurrencyId = t.participantCurrencyId
51+
FOR UPDATE
52+
end note
53+
DB --> SETTLE_DAO: Return **participantPositionId**, **positionValue** and **reservedValue**
54+
deactivate DB
55+
SETTLE_DAO -> DB: Select participant NET_DEBIT_CAP limit
56+
activate DB
57+
hnote over DB #lightyellow
58+
SELECT value AS netDebitCap
59+
FROM **participantLimit**
60+
WHERE participantCurrencyId = t.participantCurrencyId
61+
AND participantLimitTypeId = {NET_DEBIT_CAP}
62+
end note
63+
DB --> SETTLE_DAO: Return **netDebitCap**
64+
deactivate DB
65+
note right of SETTLE_DAO #lightgray
66+
**isLimitExceeded** = netDebitCap - positionValue - reservedValue - t.amount < 0
67+
**latestPosition** = positionValue + t.amount
68+
end note
69+
SETTLE_DAO->DB: Persist latestPosition
70+
activate DB
71+
hnote over DB #lightyellow
72+
UPDATE **participantPosition**
73+
SET value = {latestPosition}
74+
WHERE participantPositionId = participantPositionId
75+
76+
SELECT LAST_INSERT_ID() AS participantPositionId
77+
end note
78+
DB-->SETTLE_DAO: Return **participantPositionId**
79+
deactivate DB
80+
opt isLimitExceeded == true
81+
SETTLE_DAO->SETTLE_DAO: Increase NET_DEBIT_CAP with the value of t.amount\n<color #red>TODO:</color> Notify DFSP for NDC change
82+
end
83+
deactivate DB
84+
SETTLE_DAO -> DB: Persist transfer state and participant position change
85+
hnote over DB #lightyellow
86+
INSERT INTO **transferFulfilment** (transferId, ilpFulfilment, completedDate,
87+
isValid, settlementWindowId, createdDate)
88+
VALUES (t.transferId, 0, tTimestamp, 1, NULL, tTimestamp)
89+
90+
INSERT INTO **transferStateChange** (transferId, transferStateId, reason)
91+
VALUES (t.transferId, {COMMITTED}, 'Settlement transfer commit')
92+
93+
INSERT INTO **participantPositionChange**
94+
(participantPositionId, transferStateChangeId, value)
95+
VALUES ({participantPositionId}, {transferStateChangeId}, {latestPosition})
96+
end note
97+
activate DB
98+
deactivate DB
99+
end
100+
end
101+
end
102+
deactivate SETTLE_DAO
103+
104+
@enduml

Diagrams/SequenceDiagrams/seq-settransfer-6.3.2-commit.svg

Lines changed: 114 additions & 0 deletions
Loading

ExportDocs/CopyImages.sh

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,23 @@
22
mkdir -p ./images
33
cp docs/Wiki/*.png ./images
44
cp docs/Wiki/*.PNG ./images
5-
cp docs/DFSP/*.png ./images
6-
cp docs/DFSP/*.png ./images
5+
#cp docs/DFSP/*.png ./images
6+
#cp docs/DFSP/*.png ./images
77
cp docs/DFSP/PendingTransactions/*.png ./images
88
cp docs/DFSP/BulkPayment/src/*.png ./images
9-
cp docs/DFSP/USSD/*.PNG ./images
10-
cp docs/DFSP/USSD/*.png ./images
11-
cp docs/DFSP/USSD/*.JPG ./images
9+
#cp docs/DFSP/USSD/*.PNG ./images
10+
#cp docs/DFSP/USSD/*.png ./images
11+
#cp docs/DFSP/USSD/*.JPG ./images
1212
cp "docs/DFSP/Pending Transactions Api/diagrams"/*.png ./images
13-
cp docs/DFSP/ManageAcccoutHolders/*.jpg ./images
14-
cp "docs/DFSP/GSMA MM & L1P DFSP API"/*.jpg ./images
13+
#cp docs/DFSP/ManageAcccoutHolders/*.jpg ./images
14+
#cp "docs/DFSP/GSMA MM & L1P DFSP API"/*.jpg ./images
1515
cp docs/CentralDirectory/*.png ./images
1616
cp docs/CentralLedger/*.png ./images
17+
cp central-ledger/images/*.png ./images
1718
cp docs/CentralRules/*.png ./images
1819
cp "docs/Interop Services and Mule"/*.png ./images
1920
cp "docs/Interop Services and Mule"/*.jpg ./images
2021
cp docs/test/ilp-integration/media/*.jpg ./images
2122
cp docs/ILP/*.png ./images
2223
cp docs/ILP/*.gif ./images
23-
cp docs/ELK/images/*png ./images
24+
cp docs/ELK/images/*.png ./images

ExportDocs/dactyl-config-onboarding.yml

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ targets:
3535
https://github.com/mojaloop/docs/blob/master/Wiki/PuttyConnection.png: images/PuttyConnection.png
3636
https://github.com/mojaloop/docs/blob/master/Wiki/PuttyConfig.png: images/PuttyConfig.png
3737
https://github.com/mojaloop/docs/blob/master/Wiki/Tracking%20requirements%20to%20results.png: images/Tracking%20requirements%20to%20results.png
38-
https://github.com/mojaloop/docs/blob/master/Wiki/Glory%20of%20Rest.png: images/Glory%20of%20Rest.png
38+
https://github.com/Mojaloop/docs/blob/master/Wiki/Glory%20of%20Rest.png: images/Glory%20of%20Rest.png
3939
https://github.com/mojaloop/docs/blob/master/Wiki/mergebtn.png: images/mergebtn.png
4040
https://github.com/mojaloop/docs/blob/master/Wiki/CreateBranch.png: images/CreateBranch.png
4141
https://github.com/mojaloop/docs/blob/master/Wiki/CompareNPull.png: images/CompareNPull.png
@@ -71,13 +71,6 @@ pages:
7171
targets:
7272
- all
7373

74-
- name: 'Onboarding Developers'
75-
md: mojaloop/contribute/Onboarding-Developers.md
76-
html: Onboarding-Developers.html
77-
category: Onboarding
78-
targets:
79-
- all
80-
8174
# documentation
8275
- name: 'Structure of the Documentation'
8376
html: Structure-of-the-Documentation.html
@@ -115,15 +108,6 @@ pages:
115108
targets:
116109
- all
117110

118-
# USSD
119-
- name: 'USSD Simulator User Guide'
120-
html: USSD.html
121-
category: Testing
122-
md: docs/DFSP/USSD/README.md
123-
section_header: true
124-
targets:
125-
- all
126-
127111
# local test environment
128112
- name: 'Creating a local test environment'
129113
html: devops.html
@@ -296,8 +280,15 @@ pages:
296280
targets:
297281
- all
298282

283+
- name: 'Design Decisions'
284+
html: Design-Decisions.html
285+
category: Appendix
286+
md: mojaloop/contribute/Decision-Items.md
287+
targets:
288+
- all
289+
299290
- name: 'Tools and Process Decisions'
300-
html: Decisions.html
291+
html: Tools-Decisions.html
301292
category: Appendix
302293
md: docs/decisions.md
303294
targets:
@@ -310,6 +301,13 @@ pages:
310301
targets:
311302
- all
312303

304+
- name: 'User Story Workflow'
305+
html: user-story-workflow.html
306+
category: Appendix
307+
md: mojaloop/contribute/Pipeline.md
308+
targets:
309+
- all
310+
313311
- name: 'Roadmap'
314312
html: Roadmap.html
315313
category: Appendix

ExportDocs/dactyl-config.yml

Lines changed: 8 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ targets:
3030
image_subs:
3131
./interconnectivity-animation.gif: images/interconnectivity-animation.gif
3232
https://github.com/mojaloop/docs/blob/master/Wiki/Basic%20Overview.png: images/Basic%20Overview.png
33+
https://github.com/mojaloop/docs/blob/master/Wiki/Mojaloop%20Services%20Overview.png: images/Mojaloop%20Services%20Overview.png
3334
image_re_subs:
3435
"[./\\w]*/([\\w%.-]+[.](jpg|JPG|png|PNG))": "images/\\1"
3536
link_subs:
@@ -57,6 +58,7 @@ targets:
5758
image_subs:
5859
./interconnectivity-animation.gif: images/interconnectivity-animation.gif
5960
https://github.com/mojaloop/Docs/blob/master/Wiki/Basic%20Overview.png": images/Basic%20Overview.png
61+
https://github.com/mojaloop/docs/blob/master/Wiki/Mojaloop%20Services%20Overview.png: images/Mojaloop%20Services%20Overview.png
6062
image_re_subs:
6163
"[./\\w]*/([\\w%.-]+[.](jpg|JPG|png|PNG))": "images/\\1"
6264
link_subs:
@@ -268,6 +270,12 @@ pages:
268270
targets:
269271
- all
270272

273+
- name: 'Running Central Ledger on Kubernetes'
274+
html: central_ledger_On_Kubernetes.html
275+
category: 'Central Ledger'
276+
md: central-ledger/KUBERNETES.md
277+
targets:
278+
- all
271279

272280
#docs/CentralRules
273281
# README.md central_rules_endpoints.md
@@ -416,92 +424,6 @@ pages:
416424
- all
417425
- stakeholder
418426

419-
#/docs/DFSP
420-
- name: 'DFSP'
421-
html: DFSP.html
422-
section_header: true
423-
category: DFSP
424-
md: docs/DFSP/README.md
425-
targets:
426-
- all
427-
- stakeholder
428-
429-
- name: 'Quotes'
430-
html: dfspquotes.html
431-
md: docs/DFSP/README.md
432-
targets:
433-
- all
434-
435-
- name: 'Directory'
436-
html: directory.html
437-
category: DFSP
438-
md: docs/DFSP/directory.md
439-
targets:
440-
- all
441-
442-
- name: 'Identity'
443-
html: identity.html
444-
category: DFSP
445-
md: docs/DFSP/identity.md
446-
targets:
447-
- all
448-
449-
- name: 'Notifications'
450-
html: notification.html
451-
category: DFSP
452-
md: docs/DFSP/notification.md
453-
targets:
454-
- all
455-
456-
- name: 'Rules'
457-
html: rule.html
458-
category: DFSP
459-
md: docs/DFSP/rule.md
460-
targets:
461-
- all
462-
463-
- name: 'Subscriptions'
464-
html: subscription.html
465-
category: DFSP
466-
md: docs/DFSP/subscription.md
467-
targets:
468-
- all
469-
470-
- name: 'Transfer'
471-
html: transfer.html
472-
category: DFSP
473-
md: docs/DFSP/transfer.md
474-
targets:
475-
- all
476-
477-
- name: 'Account'
478-
html: account.html
479-
category: DFSP
480-
md: docs/DFSP/account.md
481-
targets:
482-
- all
483-
484-
- name: 'Manage Account Holders'
485-
html: ManageAccoutHolders.html
486-
category: DFSP
487-
md: docs/DFSP/ManageAcccoutHolders/ReadMe.md
488-
targets:
489-
- all
490-
491-
# - name: 'Setting up the Development Environment'
492-
# html: development.html
493-
# category: DFSP
494-
# md: docs/DFSP/development.md
495-
# targets:
496-
# - all
497-
498-
- name: 'USSD'
499-
html: USSD.html
500-
category: DFSP
501-
md: docs/DFSP/USSD/README.md
502-
targets:
503-
- all
504-
505427
# --- security/threat modeling
506428
- name: 'PKI Guide'
507429
html: pki.html

0 commit comments

Comments
 (0)