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/1100 Settlement By Currency Wrap-Up #159

Merged
merged 6 commits into from
Feb 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ CREATE TABLE `endpointType` (
`createdDate` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`endpointTypeId`),
UNIQUE KEY `endpointtype_name_unique` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
Expand Down Expand Up @@ -415,7 +415,7 @@ CREATE TABLE `migration` (
`batch` int(11) DEFAULT NULL,
`migration_time` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=153 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=155 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
Expand Down Expand Up @@ -448,7 +448,7 @@ CREATE TABLE `participant` (
`createdBy` varchar(128) NOT NULL,
PRIMARY KEY (`participantId`),
UNIQUE KEY `participant_name_unique` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
Expand Down Expand Up @@ -498,7 +498,7 @@ CREATE TABLE `participantCurrency` (
CONSTRAINT `participantcurrency_currencyid_foreign` FOREIGN KEY (`currencyId`) REFERENCES `currency` (`currencyid`),
CONSTRAINT `participantcurrency_ledgeraccounttypeid_foreign` FOREIGN KEY (`ledgerAccountTypeId`) REFERENCES `ledgerAccountType` (`ledgeraccounttypeid`),
CONSTRAINT `participantcurrency_participantid_foreign` FOREIGN KEY (`participantId`) REFERENCES `participant` (`participantid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=51 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
Expand All @@ -521,7 +521,7 @@ CREATE TABLE `participantEndpoint` (
KEY `participantendpoint_endpointtypeid_index` (`endpointTypeId`),
CONSTRAINT `participantendpoint_endpointtypeid_foreign` FOREIGN KEY (`endpointTypeId`) REFERENCES `endpointType` (`endpointtypeid`),
CONSTRAINT `participantendpoint_participantid_foreign` FOREIGN KEY (`participantId`) REFERENCES `participant` (`participantid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=120 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
Expand All @@ -548,7 +548,7 @@ CREATE TABLE `participantLimit` (
CONSTRAINT `participantlimit_participantcurrencyid_foreign` FOREIGN KEY (`participantCurrencyId`) REFERENCES `participantCurrency` (`participantcurrencyid`),
CONSTRAINT `participantlimit_participantlimittypeid_foreign` FOREIGN KEY (`participantLimitTypeId`) REFERENCES `participantLimitType` (`participantlimittypeid`),
CONSTRAINT `participantlimit_startafterparticipantpositionchangeid_foreign` FOREIGN KEY (`startAfterParticipantPositionChangeId`) REFERENCES `participantPositionChange` (`participantpositionchangeid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
Expand Down Expand Up @@ -603,7 +603,7 @@ CREATE TABLE `participantPosition` (
PRIMARY KEY (`participantPositionId`),
KEY `participantposition_participantcurrencyid_index` (`participantCurrencyId`),
CONSTRAINT `participantposition_participantcurrencyid_foreign` FOREIGN KEY (`participantCurrencyId`) REFERENCES `participantCurrency` (`participantcurrencyid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
Expand All @@ -625,7 +625,7 @@ CREATE TABLE `participantPositionChange` (
KEY `participantpositionchange_transferstatechangeid_index` (`transferStateChangeId`),
CONSTRAINT `participantpositionchange_participantpositionid_foreign` FOREIGN KEY (`participantPositionId`) REFERENCES `participantPosition` (`participantpositionid`),
CONSTRAINT `participantpositionchange_transferstatechangeid_foreign` FOREIGN KEY (`transferStateChangeId`) REFERENCES `transferStateChange` (`transferstatechangeid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
Expand Down Expand Up @@ -991,7 +991,7 @@ CREATE TABLE `segment` (
`changedDate` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`segmentId`),
KEY `segment_keys_index` (`segmentType`,`enumeration`,`tableName`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
Expand Down Expand Up @@ -1030,21 +1030,21 @@ CREATE TABLE `settlementContentAggregation` (
`ledgerEntryTypeId` int(10) unsigned NOT NULL,
`amount` decimal(18,2) NOT NULL,
`createdDate` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`settlementWindowStateId` varchar(50) NOT NULL,
`currentStateId` varchar(50) NOT NULL,
`settlementId` bigint(20) unsigned DEFAULT NULL,
PRIMARY KEY (`settlementContentAggregationId`),
KEY `settlementcontentaggregation_settlementwindowcontentid_index` (`settlementWindowContentId`),
KEY `settlementcontentaggregation_participantcurrencyid_index` (`participantCurrencyId`),
KEY `settlementcontentaggregation_transferparticipantroletypeid_index` (`transferParticipantRoleTypeId`),
KEY `settlementcontentaggregation_ledgerentrytypeid_index` (`ledgerEntryTypeId`),
KEY `settlementcontentaggregation_settlementwindowstateid_index` (`settlementWindowStateId`),
KEY `settlementcontentaggregation_currentstateid_index` (`currentStateId`),
KEY `settlementcontentaggregation_settlementid_index` (`settlementId`),
CONSTRAINT `sca_transferparticipantroletypeid_foreign` FOREIGN KEY (`transferParticipantRoleTypeId`) REFERENCES `transferParticipantRoleType` (`transferparticipantroletypeid`),
CONSTRAINT `settlementcontentaggregation_currentstateid_foreign` FOREIGN KEY (`currentStateId`) REFERENCES `settlementWindowState` (`settlementwindowstateid`),
CONSTRAINT `settlementcontentaggregation_ledgerentrytypeid_foreign` FOREIGN KEY (`ledgerEntryTypeId`) REFERENCES `ledgerEntryType` (`ledgerentrytypeid`),
CONSTRAINT `settlementcontentaggregation_participantcurrencyid_foreign` FOREIGN KEY (`participantCurrencyId`) REFERENCES `participantCurrency` (`participantcurrencyid`),
CONSTRAINT `settlementcontentaggregation_settlementid_foreign` FOREIGN KEY (`settlementId`) REFERENCES `settlement` (`settlementid`),
CONSTRAINT `settlementcontentaggregation_settlementwindowcontentid_foreign` FOREIGN KEY (`settlementWindowContentId`) REFERENCES `settlementWindowContent` (`settlementwindowcontentid`),
CONSTRAINT `settlementcontentaggregation_settlementwindowstateid_foreign` FOREIGN KEY (`settlementWindowStateId`) REFERENCES `settlementWindowState` (`settlementwindowstateid`)
CONSTRAINT `settlementcontentaggregation_settlementwindowcontentid_foreign` FOREIGN KEY (`settlementWindowContentId`) REFERENCES `settlementWindowContent` (`settlementwindowcontentid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

Expand Down Expand Up @@ -1120,6 +1120,7 @@ CREATE TABLE `settlementModel` (
`requireLiquidityCheck` tinyint(1) NOT NULL DEFAULT '1',
`ledgerAccountTypeId` int(10) unsigned NOT NULL,
PRIMARY KEY (`settlementModelId`),
UNIQUE KEY `settlementmodel_name_unique` (`name`),
KEY `settlementmodel_settlementgranularityid_index` (`settlementGranularityId`),
KEY `settlementmodel_settlementinterchangeid_index` (`settlementInterchangeId`),
KEY `settlementmodel_settlementdelayid_index` (`settlementDelayId`),
Expand Down Expand Up @@ -1569,7 +1570,7 @@ CREATE TABLE `transferExtension` (
PRIMARY KEY (`transferExtensionId`),
KEY `transferextension_transferid_foreign` (`transferId`),
CONSTRAINT `transferextension_transferid_foreign` FOREIGN KEY (`transferId`) REFERENCES `transfer` (`transferid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
Expand Down Expand Up @@ -1633,7 +1634,7 @@ CREATE TABLE `transferParticipant` (
CONSTRAINT `transferparticipant_participantcurrencyid_foreign` FOREIGN KEY (`participantCurrencyId`) REFERENCES `participantCurrency` (`participantcurrencyid`),
CONSTRAINT `transferparticipant_transferid_foreign` FOREIGN KEY (`transferId`) REFERENCES `transfer` (`transferid`),
CONSTRAINT `transferparticipant_transferparticipantroletypeid_foreign` FOREIGN KEY (`transferParticipantRoleTypeId`) REFERENCES `transferParticipantRoleType` (`transferparticipantroletypeid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
Expand Down Expand Up @@ -1707,7 +1708,7 @@ CREATE TABLE `transferStateChange` (
KEY `transferstatechange_transferstateid_index` (`transferStateId`),
CONSTRAINT `transferstatechange_transferid_foreign` FOREIGN KEY (`transferId`) REFERENCES `transfer` (`transferid`),
CONSTRAINT `transferstatechange_transferstateid_foreign` FOREIGN KEY (`transferStateId`) REFERENCES `transferState` (`transferstateid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
Expand All @@ -1725,7 +1726,7 @@ CREATE TABLE `transferTimeout` (
PRIMARY KEY (`transferTimeoutId`),
UNIQUE KEY `transfertimeout_transferid_unique` (`transferId`),
CONSTRAINT `transfertimeout_transferid_foreign` FOREIGN KEY (`transferId`) REFERENCES `transfer` (`transferid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
Expand Down Expand Up @@ -1791,4 +1792,4 @@ CREATE TABLE `transferTimeout` (
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2020-01-07 11:22:43
-- Dump completed on 2020-01-23 19:33:54
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ activate OPERATOR
{
errorInformation: {
"errorCode": <integer>,
"errorDescription": "Invalid window(s) found"
"errorDescription": "Inapplicable windows found: ${windowId1}, ${windowId2}, ..."
}
}
end note
Expand Down Expand Up @@ -180,7 +180,7 @@ activate OPERATOR
.settlementId
**settlementContentAggregation**
.settlementId
.settlementWindowStateId
.currentStateId
end hnote
deactivate DB

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ group Acknowledgement of Settlement Transfer
psTransfersCommittedCount: <integer>, // count of accounts in PS_TRANSFERS_COMMITTED state
settledCount: <integer>, // count of accounts in SETTLED state
abortedCount: <integer> // count of accounts in ABORTED state
unknownCount: <integer>,
settledIdList: <array>,
changedIdList: <array>
}
**settlementAccountsInit** copy of previous object to be preserved for comparission at the end
**allAccounts**: { // same as previous but accessed by account id (derived from <color 0000FF>settlementAccountsList</color>)
Expand Down Expand Up @@ -352,7 +355,9 @@ group Acknowledgement of Settlement Transfer
settlementParticipantCurrencySettledIdList.push(allAccounts[accountPayload.id].key)
settlementAccounts.psTransfersCommittedCount--
settlementAccounts.settledCount++
settlementAccounts.settledIdList.push(accountPayload.id)
}
settlementAccounts.changedIdList.push(accountPayload.id)
allAccounts[accountPayload.id].state = accountPayload.state
allAccounts[accountPayload.id].reason = accountPayload.reason
allAccounts[accountPayload.id].externalReference = accountPayload.externalReference
Expand Down Expand Up @@ -438,7 +443,6 @@ group Acknowledgement of Settlement Transfer
settlementWindowContent
settlementWindowContentStateChange
ledgerAccountType
currency
settlementWindow
settlementWindowStateChange
end hnote
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ group Request Settlement Window
settlementWindowContent
settlementWindowContentStateChange
ledgerAccountType
currency
end hnote
deactivate DB
SSAPI <-- SETTLE_DAO: Return **contentList**
Expand Down
Loading