Skip to content

Commit

Permalink
docs(Arc42): add new diagrams for runtime view and deployment view
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoprow committed Oct 30, 2023
1 parent e734985 commit 14b6c25
Showing 1 changed file with 161 additions and 2 deletions.
163 changes: 161 additions & 2 deletions docs/arc42/arc42-bpdm-rel_3_2.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,12 +282,171 @@ sequenceDiagram
end
```

## Upsert Generic Business Partner

```mermaid
sequenceDiagram
autonumber
SharingMember->>Gate: PUT api/catena/input/business-partners <br> 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 <br> 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 <br> Result State: 'Pending'
Orchestrator-->>Orchestrator: Set Golden Record Task State <br> Step: 'CleanAndSync' <br> StepState: 'Queued'
Orchestrator-->>Gate: Created Golden Record Task
Gate-->>Gate: Set Sharing State <br> Type: 'PENDING' <br> 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 <br> Payload: Step 'CleanAndSync'
Orchestrator-->>Orchestrator: Set Golden Record Task State <br> Step: 'CleanAndSync' <br> 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 <br> Payload: Dummy Result
Orchestrator-->>Orchestrator: Set Golden Record Task Business Partner Data to Dummy Result
Orchestrator-->>Orchestrator: Set Golden Record Task State <br> Step: 'PoolSync' <br> StepState: 'Queued'
Orchestrator-->>CleaningServiceDummy: Accept
end
loop Polling for Step 'PoolSync'
Pool->>Orchestrator: POST api/golden-record-tasks/step-reservations <br> Payload: Step 'PoolSync'
Orchestrator-->>Orchestrator: Set Golden Record Task State <br> Step: 'PoolSync' <br> 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 <br> Payload: Updated Result
Orchestrator-->>Pool: Accept
Orchestrator-->>Orchestrator: Set Golden Record Task State <br> Step: 'PoolSync' <br> Step State: 'Success'
Orchestrator-->>Orchestrator: Set Golden Record Task State <br> 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 <br> 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 <br> 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 <br> 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 <br> Result State: 'Pending'
Orchestrator-->>Orchestrator: Set Golden Record Task State <br> Step: 'Clean' <br> StepState: 'Queued'
Orchestrator-->>Gate: Created Golden Record Task
Gate-->>Gate: Set Sharing State <br> Type: 'PENDING' <br> Task ID: Golden Record Task ID
end
loop Polling for Step 'Clean'
CleaningServiceDummy->>Orchestrator: POST api/golden-record-tasks/step-reservations <br> Payload: Step 'Clean'
Orchestrator-->>Orchestrator: Set Golden Record Task State <br> Step: 'CleanAndSync' <br> StepState: 'Reserved'
Orchestrator-->>CleaningServiceDummy: Golden Record Task
CleaningServiceDummy->>Orchestrator: POST api/golden-record-tasks/step-results <br> 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 <br> Step: 'Clean' <br> Step State: 'Success'
Orchestrator-->>Orchestrator: Set Golden Record Task State <br> 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 <br> 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

Expand Down

0 comments on commit 14b6c25

Please sign in to comment.