Skip to content

Commit

Permalink
Merge pull request #57 from frmscoe/event-director
Browse files Browse the repository at this point in the history
feat: renamed CRSP to event-director
  • Loading branch information
Justus-at-Tazama authored Jun 3, 2024
2 parents e0ff943 + 98f0c3b commit 370479f
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 48 deletions.
18 changes: 9 additions & 9 deletions 4. Rule Functionality Testing - Rule 901.postman_collection.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- SPDX-License-Identifier: Apache-2.0 -->

<!-- SPDX-License-Identifier: Apache-2.0 -->

## Introduction

Tazama is prefaced with the Transaction Monitoring Service (TMS) API which makes [Postman](https://www.postman.com/) a useful tool to test platform functionality. In days gone by, Tazama was also composed out of a series of forward-chaining microservices that all had their own RESTful interfaces to receive incoming requests, but we have since replaced our inter-services communication protocol with [NATS](http://nats.io) that connects all our internal processors via its pub/sub interface. While we still use Postman to test the internal processors, we now have to access the NATS pub/sub interface via a NATS REST Proxy that we also built. (You can read more about the NATS REST proxy in the [nats-utilities](https://github.com/frmscoe/nats-utilities)) repository.
Expand Down Expand Up @@ -133,7 +133,7 @@ The paragraphs below will provide a brief overview of each of the requests and t

- Post pacs.008 to TMS API

The pacs.008 message is sent to the TMS API. The TMS API validates the incoming message and updates the database with the pacs.008 data. If the database update is successful, the message is routed to the Channel Router & Setup Processor (CRSP) and a response is generated by the API confirming that the message was successfully received. This response is not the result of the evaluation though, but only the successful receipt and ingestion of the message. The platform still has to do all the work to evaluate the message and the evaluation result will be posted to the results database once the evaluation is complete. The TMS API should respond with:
The pacs.008 message is sent to the TMS API. The TMS API validates the incoming message and updates the database with the pacs.008 data. If the database update is successful, the message is routed to the Event Director and a response is generated by the API confirming that the message was successfully received. This response is not the result of the evaluation though, but only the successful receipt and ingestion of the message. The platform still has to do all the work to evaluate the message and the evaluation result will be posted to the results database once the evaluation is complete. The TMS API should respond with:

```json
{
Expand All @@ -146,7 +146,7 @@ The paragraphs below will provide a brief overview of each of the requests and t

- Post pacs.002 to TMS API

The pacs.002 message is sent to the TMS API. The TMS API validates the incoming message and updates the database with the pacs.008 data. If the database update is successful, the message is routed to the Channel Router & Setup Processor (CRSP) and a response is generated by the API confirming that the message was successfully received. This response is not the result of the evaluation though, but only the successful receipt and ingestion of the message. The platform still has to do all the work to evaluate the message and the evaluation result will be posted to the results database once the evaluation is complete. The TMS API should respond with:
The pacs.002 message is sent to the TMS API. The TMS API validates the incoming message and updates the database with the pacs.008 data. If the database update is successful, the message is routed to the Event Director and a response is generated by the API confirming that the message was successfully received. This response is not the result of the evaluation though, but only the successful receipt and ingestion of the message. The platform still has to do all the work to evaluate the message and the evaluation result will be posted to the results database once the evaluation is complete. The TMS API should respond with:

```json
{
Expand Down
16 changes: 8 additions & 8 deletions archived-legacy-tests/CRSP-Tests.postman_collection.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"info": {
"_postman_id": "d176cd9f-1077-46fc-b23b-f6477c5a627c",
"name": "CRSP-Tests",
"name": "Event-Director-Tests",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "1323032"
},
Expand Down Expand Up @@ -162,7 +162,7 @@
"\r",
"pm.test(\"check that there is actual data received back \", function () {\r",
" pm.expect(jsonData.result).to.eql([]);\r",
" // CRSP should only process PACS.002 messages\r",
" // Event-Director should only process PACS.002 messages\r",
" //pm.expect(jsonData.result).to.not.eql([]);\r",
" //pm.expect(jsonData.result[0].networkMap.cfg).to.eql('1.0.0');\r",
"});"
Expand Down Expand Up @@ -360,7 +360,7 @@
" \r",
"pm.test(\"check that there is actual data received back \", function () {\r",
" pm.expect(jsonData.result).to.eql([]);\r",
" // CRSP should only process PACS.002 messages\r",
" // Event-Director should only process PACS.002 messages\r",
" //pm.expect(jsonData.result).to.not.eql([]);\r",
"});"
],
Expand Down Expand Up @@ -1458,7 +1458,7 @@
"response": []
},
{
"name": "CRSP Pain001",
"name": "Event-Director Pain001",
"event": [
{
"listen": "test",
Expand Down Expand Up @@ -1570,7 +1570,7 @@
"response": []
},
{
"name": "CRSP Pain 013",
"name": "Event-Director Pain 013",
"event": [
{
"listen": "test",
Expand Down Expand Up @@ -1681,7 +1681,7 @@
"response": []
},
{
"name": "CRSP Pacs 002",
"name": "Event-Director Pacs 002",
"event": [
{
"listen": "test",
Expand Down Expand Up @@ -1820,7 +1820,7 @@
"response": []
},
{
"name": "CRSP Pacs 008",
"name": "Event-Director Pacs 008",
"event": [
{
"listen": "test",
Expand Down Expand Up @@ -1932,7 +1932,7 @@
"response": []
},
{
"name": "CRSP Unknown Transaction type",
"name": "Event-Director Unknown Transaction type",
"event": [
{
"listen": "test",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,31 @@
"exec": [
"responseJSON = pm.response.json();\r",
"\r",
"let outgoingCRSPResult = responseJSON.data;\r",
"let transaction = outgoingCRSPResult.transaction\r",
"let networkMap = outgoingCRSPResult.networkMap\r",
"let dataCache = outgoingCRSPResult.DataCache\r",
"let metaData = outgoingCRSPResult.metaData;\r",
"let prcgTm = outgoingCRSPResult.metaData.prcgTmCRSP;\r",
"let EveoutgoingEventDirectorResult = responseJSON.data;\r",
"let transaction = EveoutgoingEventDirectorResult.transaction\r",
"let networkMap = EveoutgoingEventDirectorResult.networkMap\r",
"let dataCache = EveoutgoingEventDirectorResult.DataCache\r",
"let metaData = EveoutgoingEventDirectorResult.metaData;\r",
"let prcgTm = EveoutgoingEventDirectorResult.metaData.prcgTmED;\r",
"\r",
"pm.test(\"Status code is 200\", function () {\r",
" pm.response.to.have.status(200);\r",
"});\r",
"\r",
"pm.test('Has a transaction object', function() {\r",
" pm.expect(outgoingCRSPResult).to.have.property('transaction');\r",
" pm.expect(EveoutgoingEventDirectorResult).to.have.property('transaction');\r",
"});\r",
"\r",
"pm.test('Has a networkMap object', function() {\r",
" pm.expect(outgoingCRSPResult).to.have.property('networkMap');\r",
" pm.expect(EveoutgoingEventDirectorResult).to.have.property('networkMap');\r",
"});\r",
"\r",
"pm.test('Has a dataCache object', function() {\r",
" pm.expect(outgoingCRSPResult).to.have.property('DataCache');\r",
" pm.expect(EveoutgoingEventDirectorResult).to.have.property('DataCache');\r",
"});\r",
"\r",
"pm.test('Has a metaData object', function() {\r",
" pm.expect(outgoingCRSPResult).to.have.property('metaData');\r",
" pm.expect(EveoutgoingEventDirectorResult).to.have.property('metaData');\r",
"});\r",
"\r",
"pm.test(`Processing time: ${(prcgTm/1000000).toFixed(3)} milliseconds`, function () {\r",
Expand All @@ -58,7 +58,7 @@
"let moment = require('moment');\r",
"// ## Set up rule config\r",
"\r",
"const requestDestination = `CRSP`;\r",
"const requestDestination = `event-director`;\r",
"const responseDestination = `[email protected]`;\r",
"\r",
"pm.variables.set('$randomUUID', \"sadsafsa\");\r",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,25 @@
"script": {
"exec": [
"responseJSON = pm.response.json();\r",
"let outgoingCRSPResult = responseJSON.data;\r",
"let transaction = outgoingCRSPResult.transaction\r",
"let networkMap = outgoingCRSPResult.networkMap\r",
"let report = outgoingCRSPResult.report;\r",
"let outgoingEventDirectorResult = responseJSON.data;\r",
"let transaction = outgoingEventDirectorResult.transaction\r",
"let networkMap = outgoingEventDirectorResult.networkMap\r",
"let report = outgoingEventDirectorResult.report;\r",
"\r",
"pm.test(\"Status code is 200\", function () {\r",
" pm.response.to.have.status(200);\r",
"});\r",
"\r",
"pm.test('Has a transaction object', function() {\r",
" pm.expect(outgoingCRSPResult).to.have.property('transaction');\r",
" pm.expect(outgoingEventDirectorResult).to.have.property('transaction');\r",
"});\r",
"\r",
"pm.test('Has a networkMap object', function() {\r",
" pm.expect(outgoingCRSPResult).to.have.property('networkMap');\r",
" pm.expect(outgoingEventDirectorResult).to.have.property('networkMap');\r",
"});\r",
"\r",
"pm.test('Has a report object', function() {\r",
" pm.expect(outgoingCRSPResult).to.have.property('report');\r",
" pm.expect(outgoingEventDirectorResult).to.have.property('report');\r",
"});\r",
"\r",
"pm.test('Has a status attribute', function() {\r",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,26 @@
"script": {
"exec": [
"responseJSON = pm.response.json();\r",
"let outgoingCRSPResult = responseJSON.data;\r",
"let transaction = outgoingCRSPResult.transaction\r",
"let networkMap = outgoingCRSPResult.networkMap\r",
"let metaData = outgoingCRSPResult.metaData;\r",
"let prcgTm = outgoingCRSPResult.metaData.prcgTmCRSP;\r",
"let outgoingEventDirectorResult = responseJSON.data;\r",
"let transaction = outgoingEventDirectorResult.transaction\r",
"let networkMap = outgoingEventDirectorResult.networkMap\r",
"let metaData = outgoingEventDirectorResult.metaData;\r",
"let prcgTm = outgoingEventDirectorResult.metaData.prcgTmED;\r",
"\r",
"pm.test(\"Status code is 200\", function () {\r",
" pm.response.to.have.status(200);\r",
"});\r",
"\r",
"pm.test('Has a transaction object', function() {\r",
" pm.expect(outgoingCRSPResult).to.have.property('transaction');\r",
" pm.expect(outgoingEventDirectorResult).to.have.property('transaction');\r",
"});\r",
"\r",
"pm.test('Has a networkMap object', function() {\r",
" pm.expect(outgoingCRSPResult).to.have.property('networkMap');\r",
" pm.expect(outgoingEventDirectorResult).to.have.property('networkMap');\r",
"});\r",
"\r",
"pm.test('Has a metaData object', function() {\r",
" pm.expect(outgoingCRSPResult).to.have.property('metaData');\r",
" pm.expect(outgoingEventDirectorResult).to.have.property('metaData');\r",
"});\r",
"\r",
"pm.test(`Processing time: ${(prcgTm/1000000).toFixed(3)} milliseconds`, function () {\r",
Expand Down Expand Up @@ -65,7 +65,7 @@
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"destination\": \"{{requestDestination}}\",\r\n \"consumer\": \"{{responseDestination}}\",\r\n \"functionName\": \"{{messageIdPacs002}}\",\r\n \"message\": {\r\n \"transaction\": {\"TxTp\":\"pacs.002.001.12\",\"FIToFIPmtSts\":{\"GrpHdr\":{\"MsgId\":\"c410d8e707f948689891cd250fff0918\",\"CreDtTm\":\"2023-09-21T12:41:57.949Z\"},\"TxInfAndSts\":{\"OrgnlInstrId\":\"5ab4fc7355de4ef8a75b78b00a681ed2\",\"OrgnlEndToEndId\":\"963902be53f741318b5f7c90972021d2\",\"TxSts\":\"ACCC\",\"ChrgsInf\":[{\"Amt\":{\"Amt\":0,\"Ccy\":\"USD\"},\"Agt\":{\"FinInstnId\":{\"ClrSysMmbId\":{\"MmbId\":\"dfsp001\"}}}},{\"Amt\":{\"Amt\":0,\"Ccy\":\"USD\"},\"Agt\":{\"FinInstnId\":{\"ClrSysMmbId\":{\"MmbId\":\"dfsp001\"}}}},{\"Amt\":{\"Amt\":0,\"Ccy\":\"USD\"},\"Agt\":{\"FinInstnId\":{\"ClrSysMmbId\":{\"MmbId\":\"dfsp002\"}}}}],\"AccptncDtTm\":\"2023-06-02T07:52:31.000Z\",\"InstgAgt\":{\"FinInstnId\":{\"ClrSysMmbId\":{\"MmbId\":\"dfsp001\"}}},\"InstdAgt\":{\"FinInstnId\":{\"ClrSysMmbId\":{\"MmbId\":\"dfsp002\"}}}}}},\r\n \"networkMap\": {\r\n \"name\": \"Step-by-step processor testing - rule output to mock API\",\r\n \"active\": true,\r\n \"cfg\": \"1.0.0\",\r\n \"messages\": [\r\n {\r\n \"id\": \"[email protected]\",\r\n \"host\": \"NATS Server\",\r\n \"cfg\": \"1.0.0\",\r\n \"txTp\": \"pacs.002.001.12\",\r\n \"channels\": [\r\n {\r\n \"id\": \"[email protected]\",\r\n \"host\": \"NATS Server\",\r\n \"cfg\": \"1.0.0\",\r\n \"typologies\": [\r\n {\r\n \"id\": \"[email protected]\",\r\n \"host\": \"NATS Server\",\r\n \"cfg\": \"[email protected]\",\r\n \"rules\": [\r\n {\r\n \"id\": \"[email protected]\",\r\n \"host\": \"rule-pub-001\",\r\n \"cfg\": \"1.0.0\"\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n \"metaData\": {\r\n \"prcgTmDP\": 5829672,\r\n \"prcgTmCRSP\": 3375241\r\n },\r\n \"ruleResult\": {\r\n \"id\": \"[email protected]\",\r\n \"cfg\": \"1.0.0\",\r\n \"result\": true,\r\n \"subRuleRef\": \".02\",\r\n \"reason\": \"Creditor account is less than 1 day old\",\r\n \"desc\": \"Derived account age - creditor\",\r\n \"prcgTm\": 11024622\r\n } \r\n }\r\n}",
"raw": "{\r\n \"destination\": \"{{requestDestination}}\",\r\n \"consumer\": \"{{responseDestination}}\",\r\n \"functionName\": \"{{messageIdPacs002}}\",\r\n \"message\": {\r\n \"transaction\": {\"TxTp\":\"pacs.002.001.12\",\"FIToFIPmtSts\":{\"GrpHdr\":{\"MsgId\":\"c410d8e707f948689891cd250fff0918\",\"CreDtTm\":\"2023-09-21T12:41:57.949Z\"},\"TxInfAndSts\":{\"OrgnlInstrId\":\"5ab4fc7355de4ef8a75b78b00a681ed2\",\"OrgnlEndToEndId\":\"963902be53f741318b5f7c90972021d2\",\"TxSts\":\"ACCC\",\"ChrgsInf\":[{\"Amt\":{\"Amt\":0,\"Ccy\":\"USD\"},\"Agt\":{\"FinInstnId\":{\"ClrSysMmbId\":{\"MmbId\":\"dfsp001\"}}}},{\"Amt\":{\"Amt\":0,\"Ccy\":\"USD\"},\"Agt\":{\"FinInstnId\":{\"ClrSysMmbId\":{\"MmbId\":\"dfsp001\"}}}},{\"Amt\":{\"Amt\":0,\"Ccy\":\"USD\"},\"Agt\":{\"FinInstnId\":{\"ClrSysMmbId\":{\"MmbId\":\"dfsp002\"}}}}],\"AccptncDtTm\":\"2023-06-02T07:52:31.000Z\",\"InstgAgt\":{\"FinInstnId\":{\"ClrSysMmbId\":{\"MmbId\":\"dfsp001\"}}},\"InstdAgt\":{\"FinInstnId\":{\"ClrSysMmbId\":{\"MmbId\":\"dfsp002\"}}}}}},\r\n \"networkMap\": {\r\n \"name\": \"Step-by-step processor testing - rule output to mock API\",\r\n \"active\": true,\r\n \"cfg\": \"1.0.0\",\r\n \"messages\": [\r\n {\r\n \"id\": \"[email protected]\",\r\n \"host\": \"NATS Server\",\r\n \"cfg\": \"1.0.0\",\r\n \"txTp\": \"pacs.002.001.12\",\r\n \"channels\": [\r\n {\r\n \"id\": \"[email protected]\",\r\n \"host\": \"NATS Server\",\r\n \"cfg\": \"1.0.0\",\r\n \"typologies\": [\r\n {\r\n \"id\": \"[email protected]\",\r\n \"host\": \"NATS Server\",\r\n \"cfg\": \"[email protected]\",\r\n \"rules\": [\r\n {\r\n \"id\": \"[email protected]\",\r\n \"host\": \"rule-pub-001\",\r\n \"cfg\": \"1.0.0\"\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n \"metaData\": {\r\n \"prcgTmDP\": 5829672,\r\n \"prcgTmED\": 3375241\r\n },\r\n \"ruleResult\": {\r\n \"id\": \"[email protected]\",\r\n \"cfg\": \"1.0.0\",\r\n \"result\": true,\r\n \"subRuleRef\": \".02\",\r\n \"reason\": \"Creditor account is less than 1 day old\",\r\n \"desc\": \"Derived account age - creditor\",\r\n \"prcgTm\": 11024622\r\n } \r\n }\r\n}",
"options": {
"raw": {
"language": "json"
Expand Down

0 comments on commit 370479f

Please sign in to comment.