From 14b6c25d5cb3056017adf2a724980ecc03bcc4fe Mon Sep 17 00:00:00 2001 From: Nico Koprowski Date: Mon, 30 Oct 2023 16:42:27 +0100 Subject: [PATCH] docs(Arc42): add new diagrams for runtime view and deployment view --- docs/arc42/arc42-bpdm-rel_3_2.md | 163 ++++++++++++++++++++++++++++++- 1 file changed, 161 insertions(+), 2 deletions(-) diff --git a/docs/arc42/arc42-bpdm-rel_3_2.md b/docs/arc42/arc42-bpdm-rel_3_2.md index e4fe8fe64..6f84ec271 100644 --- a/docs/arc42/arc42-bpdm-rel_3_2.md +++ b/docs/arc42/arc42-bpdm-rel_3_2.md @@ -282,12 +282,171 @@ sequenceDiagram end ``` +## Upsert Generic Business Partner + +```mermaid +sequenceDiagram + autonumber + + SharingMember->>Gate: PUT api/catena/input/business-partners
Payload: Business Partner Data A + Gate-->>Gate: Persist Business Partner Data Input + Gate-->>Gate: Set Sharing State to 'Initial' + Gate-->>Gate: Add Changelog Entry 'Create' for Business Partner Input + Gate->>Orchestrator: POST api/golden-record-tasks
Payload: Business Partner Input Data in mode 'UpdateFromSharingMember' + Orchestrator-->>Orchestrator: Create Golden Record Task for Business Partner Data + Orchestrator-->>Orchestrator: Set Golden Record Task State
Result State: 'Pending' + Orchestrator-->>Orchestrator: Set Golden Record Task State
Step: 'CleanAndSync'
StepState: 'Queued' + Orchestrator-->>Gate: Created Golden Record Task + Gate-->>Gate: Set Sharing State
Type: 'PENDING'
Task ID: Golden Record Task ID + Gate-->>SharingMember: Upserted Business Partner + + loop Polling for Step 'CleanAndSync' + CleaningServiceDummy->>Orchestrator: POST api/golden-record-tasks/step-reservations
Payload: Step 'CleanAndSync' + Orchestrator-->>Orchestrator: Set Golden Record Task State
Step: 'CleanAndSync'
StepState: 'Reserved' + Orchestrator-->>CleaningServiceDummy: Golden Record Task + CleaningServiceDummy-->>CleaningServiceDummy: Set L/S/A and Generic Business Partner Dummy Cleaning Result + CleaningServiceDummy-->>CleaningServiceDummy: Set BPN References to L/S/A result + CleaningServiceDummy->>Orchestrator: POST api/golden-record-tasks/step-results
Payload: Dummy Result + Orchestrator-->>Orchestrator: Set Golden Record Task Business Partner Data to Dummy Result + Orchestrator-->>Orchestrator: Set Golden Record Task State
Step: 'PoolSync'
StepState: 'Queued' + Orchestrator-->>CleaningServiceDummy: Accept + end + + loop Polling for Step 'PoolSync' + Pool->>Orchestrator: POST api/golden-record-tasks/step-reservations
Payload: Step 'PoolSync' + Orchestrator-->>Orchestrator: Set Golden Record Task State
Step: 'PoolSync'
StepState: 'Reserved' + Orchestrator-->>Pool: Golden Record Task + opt Golden Record Legal Entity Data marked as changed + Pool-->>Pool: Upsert Legal Entity from Golden Record Task Legal Entity Data + Pool-->>Pool: Add Changelog Entry for BPNL + end + opt Golden Record Site Data marked as changed + Pool-->>Pool: Upsert Site from Golden Record Task Site Data + Pool-->>Pool: Add Changelog Entry for BPNS + end + opt Golden Record Address Data marked as changed + Pool-->>Pool: Upsert Address from Golden Record Task Address Data + Pool-->>Pool: Add Changelog Entry for BPNA + end + Pool-->>Pool: Set BPNs in Golden Record Task Generic Business Partner Data + Pool->>Orchestrator: POST api/golden-record-tasks/step-results
Payload: Updated Result + Orchestrator-->>Pool: Accept + Orchestrator-->>Orchestrator: Set Golden Record Task State
Step: 'PoolSync'
Step State: 'Success' + Orchestrator-->>Orchestrator: Set Golden Record Task State
Result State: 'Success' + end + + loop Polling for finished Golden Record Tasks + Gate-->>Gate: Query sharing states in Sharing State Type 'PENDING' + Gate->>Orchestrator: POST golden-record-tasks/state/search
Payload: Golde Record Task ID + Orchestrator-->Gate: Golden Record Task State and Result + Gate-->>Gate: Persist Business Partner Output + Gate-->>Gate: Set Sharing State 'Success' + Gate-->>Gate: Add Changelog Entry 'Create' for Business Partner Output + end +``` + +## Update on Golden Record Change + +```mermaid +sequenceDiagram + autonumber + + Pool-->Pool: Add Changelog Entry for BPNL + + loop Polling Pool Changelog + Gate->>Pool: POST api/catena/changelog/search
Payload: From After Last Search Time + Pool-->>Gate: Changelog entry for BPNL + Gate-->>Gate: Query Business Partner Output with BPNL + Gate->>Orchestrator: POST api/golden-record-tasks
Payload: Business Partner Output Data in mode 'UpdateFromPool' + Orchestrator-->>Orchestrator: Create Golden Record Task for Business Partner Data + Orchestrator-->>Orchestrator: Set Golden Record Task State
Result State: 'Pending' + Orchestrator-->>Orchestrator: Set Golden Record Task State
Step: 'Clean'
StepState: 'Queued' + Orchestrator-->>Gate: Created Golden Record Task + Gate-->>Gate: Set Sharing State
Type: 'PENDING'
Task ID: Golden Record Task ID + end + + loop Polling for Step 'Clean' + CleaningServiceDummy->>Orchestrator: POST api/golden-record-tasks/step-reservations
Payload: Step 'Clean' + Orchestrator-->>Orchestrator: Set Golden Record Task State
Step: 'CleanAndSync'
StepState: 'Reserved' + Orchestrator-->>CleaningServiceDummy: Golden Record Task + CleaningServiceDummy->>Orchestrator: POST api/golden-record-tasks/step-results
Payload: Golden Record Task Business Partner Data + Orchestrator-->>Orchestrator: Set Golden Record Task Business Partner Data to Dummy Result + Orchestrator-->>Orchestrator: Set Golden Record Task State
Step: 'Clean'
Step State: 'Success' + Orchestrator-->>Orchestrator: Set Golden Record Task State
Result State: 'Success' + Orchestrator-->>CleaningServiceDummy: Accept + end + + loop Polling for finished Golden Record Tasks + Gate-->>Gate: Query sharing states in Sharing State Type 'PENDING' + Gate->>Orchestrator: POST golden-record-tasks/state/search
Payload: Golde Record Task ID + Orchestrator-->Gate: Golden Record Task State and Result + Gate-->>Gate: Persist Business Partner Output + Gate-->>Gate: Set Sharing State 'Success' + Gate-->>Gate: Add Changelog Entry 'Create' for Business Partner Output + end +``` # Deployment View -How to run the service +Basic deployment information without Kubernetes: + +```mermaid +C4Context + + Person(bpdm_user, "(Technical) User of the BPDM APIs") + + System(pool_postgres, "Pool Database" "Postgres: 14.5") + System(gate_postgres, "Gate Database" "Postgres: 14.5") + System(bridge_postgres, "Gate Database" "Postgres: 14.5") + + + Deployment_Node(pool_machine, "OS Environment", "Linux Alpine 3.16"){ + Deployment_Node(pool_java, "Runtime Environment", "JAVA RE 17") { + Container(pool_container, "Pool Application", "Spring Boot: 3.1") + } + } -![Deployment View](images/deployment-view-3-2.png) + Deployment_Node(gate_machine, "OS Environment", "Linux Alpine 3.16"){ + Deployment_Node(gate_java, "Runtime Environment", "JAVA RE 17") { + Container(gate_container, "Gate Application", "Spring Boot: 3.1") + } + } + + Deployment_Node(bridge_machine, "OS Environment", "Linux Alpine 3.16"){ + Deployment_Node(bridge_java, "Runtime Environment", "JAVA RE 17") { + Container(bridge_container, "Bridge Dummy Application", "Spring Boot: 3.1") + } + } + + Deployment_Node(orchestrator_machine, "OS Environment", "Linux Alpine 3.16"){ + Deployment_Node(orchestrator_java, "Runtime Environment", "JAVA RE 17") { + Container(orchestrator_container, "Orchestrator Application", "Spring Boot: 3.1") + } + } + + Deployment_Node(dummy_machine, "OS Environment", "Linux Alpine 3.16"){ + Deployment_Node(dummy_java, "Runtime Environment", "JAVA RE 17") { + Container(dummy_container, "Cleaning Service Dummy Application", "Spring Boot: 3.1") + } + } + + Rel(bpdm_user, pool_container, "HTTP/S") + Rel(pool_container, pool_postgres, "TCP/IP") + + Rel(bpdm_user, gate_container, "HTTP/S") + Rel(gate_container, gate_postgres, "TCP/IP") + + Rel(bpdm_user, bridge_container, "HTTP/S") + Rel(bridge_container, bridge_postgres, "TCP/IP") + + Rel(pool_container, orchestrator_container, "HTTP/S") + Rel(gate_container, orchestrator_container, "HTTP/S") + Rel(dummy_container, orchestrator_container, "HTTP/S") + + Rel(bridge_container, pool_container, "HTTP/S") + Rel(bridge_container, gate_container, "HTTP/S") + +``` # Crosscutting Concepts