Skip to content

Commit

Permalink
[MODORGSTOR-164] Implement audit outbox pattern for sending kafka eve…
Browse files Browse the repository at this point in the history
…nts about organization updates (#487)

* [MODORGSTOR-164] Implement audit outbox pattern for sending kafka events about organization updates

* [MODORGSTOR-164] Fix misspelled attribute

* [MODORGSTOR-164] Add samples
  • Loading branch information
Saba-Zedginidze-EPAM authored Nov 18, 2024
1 parent 1652e69 commit a4f78a6
Show file tree
Hide file tree
Showing 7 changed files with 487 additions and 0 deletions.
200 changes: 200 additions & 0 deletions mod-orgs/examples/organization_audit_event.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
{
"id": "99fb699a-cdf1-11e9-a9d9-f2801f1b9aa1",
"action": "Create",
"organizationId": "588b5c42-8634-4af7-bc9b-5e0116ed96b6",
"userId": "16d2457c-d137-11e8-a8d5-f2802f1b9fd1",
"eventDate": "2018-07-19T00:00:00.000+0000",
"actionDate": "2018-07-19T00:00:00.000+0000",
"organizationSnapshot": {
"id": "588b5c42-8634-4af7-bc9b-5e0116ed96b6",
"name": "GOBI",
"code": "AQ-GOBI",
"description": "This is Yankee Book Peddler.",
"exportToAccounting" : true,
"status": "Active",
"organizationTypes": [
"f04c7277-0019-43cf-84b3-02d894a9d81a"
],
"language": "en-us",
"isVendor": true,
"sanCode": "1234567",
"aliases": [
{
"value": "YBP",
"description": "AKA"
},
{
"value": "Yankee Book Peddler",
"description": "Formerly known as"
}
],
"addresses": [
{
"addressLine1": "10 Estes Street",
"addressLine2": "",
"city": "Ipswich",
"stateRegion": "MA",
"zipCode": "01938",
"country": "USA",
"categories": [
"0e3f9680-ab06-4565-af64-609b7364e6eb",
"996ecd31-7ca4-4d8d-9bbf-bc94dff5f6c6",
"112ae2e4-88ae-4fa5-a75b-2379d2035e52",
"56288fe8-8037-44da-8395-01d2d106dc54"
],
"language": "en"
}
],
"phoneNumbers": [
{
"phoneNumber": "19789999999",
"categories": [
"0e3f9680-ab06-4565-af64-609b7364e6eb",
"996ecd31-7ca4-4d8d-9bbf-bc94dff5f6c6"
],
"language": "en-us"
}
],
"emails": [
{
"value": "[email protected]",
"description": "Main",
"categories": [
"112ae2e4-88ae-4fa5-a75b-2379d2035e52",
"56288fe8-8037-44da-8395-01d2d106dc54"
],
"language": "en-us"
}
],
"urls": [
{
"value": "http://folio.org",
"description": "corporate",
"language": "en-us",
"categories": [
"112ae2e4-88ae-4fa5-a75b-2379d2035e52",
"56288fe8-8037-44da-8395-01d2d106dc54"
],
"notes": "note"
}
],
"contacts": [
"9a665b22-9fe5-4c95-b4ee-837a5433c95d"
],
"privilegedContacts": [
"785678a9-7966-4ad8-be46-22149513a386"
],
"agreements": [
{
"name": "History Follower Incentive",
"discount": 10,
"referenceUrl": "http://my_sample_agreement.com",
"notes": ""
}
],
"erpCode": "AQ-GOBI-HIST",
"paymentMethod": "EFT",
"accessProvider": true,
"governmental": true,
"licensor": true,
"materialSupplier": true,
"vendorCurrencies": [
"USD",
"CAD",
"GBP"
],
"claimingInterval": 30,
"discountPercent": 10,
"expectedActivationInterval": 1,
"expectedInvoiceInterval": 5,
"renewalActivationInterval": 1,
"subscriptionInterval": 365,
"expectedReceiptInterval": 1,
"liableForVat": false,
"taxId": "TX-GOBI-HIST",
"taxPercentage": 5,
"edi": {
"vendorEdiCode": "AQ-GOBI-HIST",
"vendorEdiType": "014/EAN",
"libEdiCode": "MY-LIB-1",
"libEdiType": "014/EAN",
"prorateTax": true,
"prorateFees": true,
"ediNamingConvention": "",
"sendAcctNum": true,
"supportOrder": true,
"supportInvoice": true,
"notes": "",
"ediFtp": {
"ftpFormat": "SFTP",
"serverAddress": "http://127.0.0.1",
"username": "edi_username",
"password": "edi_password",
"ftpMode": "ASCII",
"ftpConnMode": "Active",
"ftpPort": 22,
"orderDirectory": "/path/to/order/directory",
"invoiceDirectory": "/path/to/invoice/directory",
"notes": "My FTP notes"
},
"ediJob": {
"scheduleEdi": false,
"schedulingDate": null,
"time": null,
"isMonday": false,
"isTuesday": false,
"isWednesday": false,
"isThursday": false,
"isFriday": false,
"isSaturday": false,
"isSunday": false,
"sendToEmails": "[email protected], [email protected]",
"notifyAllEdi": true,
"notifyInvoiceOnly": true,
"notifyErrorOnly": false
}
},
"interfaces": [
"9fc51738-e12a-4049-88dd-eb82b45da292",
"588b5c42-8634-4af7-bc9b-5e0116ed96b6",
"290c9e17-1434-5f47-a396-9d4875b3eaf7"
],
"accounts": [
{
"name": "History Account",
"accountNo": "GOBI-HIST-12",
"description": "This is my account description.",
"appSystemNo": "FIN-GOBI-HIST-12",
"paymentMethod": "EFT",
"accountStatus": "Active",
"contactInfo": "Some basic contact information note.",
"libraryCode": "My Library",
"libraryEdiCode": "MY-LIB-1",
"notes": "note",
"acqUnitIds": [
"1895e539-8dac-441e-b1f5-aab62b3fde60",
"47f504bd-0c1b-498e-a2ae-e2f0a0cea273"
]
}
],
"changelogs": [
{
"description": "This is a sample note.",
"timestamp": "2008-05-15T03:53:00-07:00"
}
],
"acqUnitIds": [
"1895e539-8dac-441e-b1f5-aab62b3fde60",
"47f504bd-0c1b-498e-a2ae-e2f0a0cea273"
],
"tags" : {
"tagList" : [
"important"
]
},
"metadata": {
"createdDate": "2018-07-19T00:00:00.000+0000",
"createdByUserId": "16d2457c-d137-11e8-a8d5-f2802f1b9fd1"
}
}
}
197 changes: 197 additions & 0 deletions mod-orgs/examples/outbox_event_log.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,197 @@
{
"eventId": "99fb699a-cdf1-11e9-a9d9-f2801f1b9aa1",
"entityType": "Organization",
"action": "Create",
"payload": {
"id": "588b5c42-8634-4af7-bc9b-5e0116ed96b6",
"name": "GOBI",
"code": "AQ-GOBI",
"description": "This is Yankee Book Peddler.",
"exportToAccounting" : true,
"status": "Active",
"organizationTypes": [
"f04c7277-0019-43cf-84b3-02d894a9d81a"
],
"language": "en-us",
"isVendor": true,
"sanCode": "1234567",
"aliases": [
{
"value": "YBP",
"description": "AKA"
},
{
"value": "Yankee Book Peddler",
"description": "Formerly known as"
}
],
"addresses": [
{
"addressLine1": "10 Estes Street",
"addressLine2": "",
"city": "Ipswich",
"stateRegion": "MA",
"zipCode": "01938",
"country": "USA",
"categories": [
"0e3f9680-ab06-4565-af64-609b7364e6eb",
"996ecd31-7ca4-4d8d-9bbf-bc94dff5f6c6",
"112ae2e4-88ae-4fa5-a75b-2379d2035e52",
"56288fe8-8037-44da-8395-01d2d106dc54"
],
"language": "en"
}
],
"phoneNumbers": [
{
"phoneNumber": "19789999999",
"categories": [
"0e3f9680-ab06-4565-af64-609b7364e6eb",
"996ecd31-7ca4-4d8d-9bbf-bc94dff5f6c6"
],
"language": "en-us"
}
],
"emails": [
{
"value": "[email protected]",
"description": "Main",
"categories": [
"112ae2e4-88ae-4fa5-a75b-2379d2035e52",
"56288fe8-8037-44da-8395-01d2d106dc54"
],
"language": "en-us"
}
],
"urls": [
{
"value": "http://folio.org",
"description": "corporate",
"language": "en-us",
"categories": [
"112ae2e4-88ae-4fa5-a75b-2379d2035e52",
"56288fe8-8037-44da-8395-01d2d106dc54"
],
"notes": "note"
}
],
"contacts": [
"9a665b22-9fe5-4c95-b4ee-837a5433c95d"
],
"privilegedContacts": [
"785678a9-7966-4ad8-be46-22149513a386"
],
"agreements": [
{
"name": "History Follower Incentive",
"discount": 10,
"referenceUrl": "http://my_sample_agreement.com",
"notes": ""
}
],
"erpCode": "AQ-GOBI-HIST",
"paymentMethod": "EFT",
"accessProvider": true,
"governmental": true,
"licensor": true,
"materialSupplier": true,
"vendorCurrencies": [
"USD",
"CAD",
"GBP"
],
"claimingInterval": 30,
"discountPercent": 10,
"expectedActivationInterval": 1,
"expectedInvoiceInterval": 5,
"renewalActivationInterval": 1,
"subscriptionInterval": 365,
"expectedReceiptInterval": 1,
"liableForVat": false,
"taxId": "TX-GOBI-HIST",
"taxPercentage": 5,
"edi": {
"vendorEdiCode": "AQ-GOBI-HIST",
"vendorEdiType": "014/EAN",
"libEdiCode": "MY-LIB-1",
"libEdiType": "014/EAN",
"prorateTax": true,
"prorateFees": true,
"ediNamingConvention": "",
"sendAcctNum": true,
"supportOrder": true,
"supportInvoice": true,
"notes": "",
"ediFtp": {
"ftpFormat": "SFTP",
"serverAddress": "http://127.0.0.1",
"username": "edi_username",
"password": "edi_password",
"ftpMode": "ASCII",
"ftpConnMode": "Active",
"ftpPort": 22,
"orderDirectory": "/path/to/order/directory",
"invoiceDirectory": "/path/to/invoice/directory",
"notes": "My FTP notes"
},
"ediJob": {
"scheduleEdi": false,
"schedulingDate": null,
"time": null,
"isMonday": false,
"isTuesday": false,
"isWednesday": false,
"isThursday": false,
"isFriday": false,
"isSaturday": false,
"isSunday": false,
"sendToEmails": "[email protected], [email protected]",
"notifyAllEdi": true,
"notifyInvoiceOnly": true,
"notifyErrorOnly": false
}
},
"interfaces": [
"9fc51738-e12a-4049-88dd-eb82b45da292",
"588b5c42-8634-4af7-bc9b-5e0116ed96b6",
"290c9e17-1434-5f47-a396-9d4875b3eaf7"
],
"accounts": [
{
"name": "History Account",
"accountNo": "GOBI-HIST-12",
"description": "This is my account description.",
"appSystemNo": "FIN-GOBI-HIST-12",
"paymentMethod": "EFT",
"accountStatus": "Active",
"contactInfo": "Some basic contact information note.",
"libraryCode": "My Library",
"libraryEdiCode": "MY-LIB-1",
"notes": "note",
"acqUnitIds": [
"1895e539-8dac-441e-b1f5-aab62b3fde60",
"47f504bd-0c1b-498e-a2ae-e2f0a0cea273"
]
}
],
"changelogs": [
{
"description": "This is a sample note.",
"timestamp": "2008-05-15T03:53:00-07:00"
}
],
"acqUnitIds": [
"1895e539-8dac-441e-b1f5-aab62b3fde60",
"47f504bd-0c1b-498e-a2ae-e2f0a0cea273"
],
"tags" : {
"tagList" : [
"important"
]
},
"metadata": {
"createdDate": "2018-07-19T00:00:00.000+0000",
"createdByUserId": "16d2457c-d137-11e8-a8d5-f2802f1b9fd1"
}
}
}
Loading

0 comments on commit a4f78a6

Please sign in to comment.