Skip to content

Commit

Permalink
Merge pull request #85 from wbcsd/uml
Browse files Browse the repository at this point in the history
feat: include events UML diagram
  • Loading branch information
zeitgeist authored Jun 24, 2024
2 parents 2dd6bde + 0bcc85c commit 3d760e3
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
25 changes: 25 additions & 0 deletions spec/v2/diagrams/events.mmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
sequenceDiagram
participant D as Data Recipient
participant H as Data Owner

Note over D, H: Data Recipient requests a new<br/> or updated PCF from Host System
D->>H: POST [SubPath]/2/events
Activate H
break Does not accept event
H->>D: Returns with HTTP Code 400
end

H->>D: Returns with HTTP Code 200
Deactivate H

Note over D, H: Host system now processes<br/> the request as specified in<br/>Business Case 1

alt PCFs do not exist / partial match
H->>H: Host system decides on processing<br/>potentially involving skilled personnel
H->>D: Sends event with either PCFs or error body
else 1 or more matching PCFs exist
Note over H: Sends matching PCFs as<br/>an event
H->>D: Sends event containing matching PCFs
else Default case
H->>D: Sends event with an error body
end
18 changes: 17 additions & 1 deletion spec/v2/index.bs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<pre class='metadata'>
Title: Technical Specifications for PCF Data Exchange
Text Macro: VERSION 2.2.1-20240513
Text Macro: VERSION 2.2.1-20240624
Shortname: data-exchange-protocol
Level: 1
Status: LD
Expand Down Expand Up @@ -177,6 +177,17 @@ For now, this chapter focuses on asynchronous event processing. It will be expan

#### Workflow #### {#business-cases-async-events-1-workflow}

A graphical representation of the workflow is given below. However, this flow is for illustrative
purposes only and does not replace or otherwise alter the text below the diagram.

Note: All requests to the `/events` endpoint require authentication (omitted from the diagram
below). See [[#api-auth]] for details.

<figure>
<img src="diagrams/events.svg" height="100%" width="100%" >
<figcaption>Event processing workflow.</figcaption>
</figure>

1. The data recipient sends a `ProductFootprintFragment` to the `Events Endpoint` of the data owner. The data recipient should always include 1 or more product ids in property `productIds`. The data recipient should limit each fragment to exactly 1 specific product (e.g. a specific type of apple instead of all apples that somebody is offering)
1. If the recipient is requesting a specific reporting period, it should include the reporting
period accordingly
Expand Down Expand Up @@ -2527,6 +2538,11 @@ path: LICENSE.md

# Appendix B: Changelog # {#changelog}

## Version 2.2.1 (June 24, 2024) ## {#changelog-2.2.1-20240624}

Summary of changes:
1. add diagram with visual representation of asynchronous event processing workflow

## Version 2.2.1 (May 13, 2024) ## {#changelog-2.2.1-20240513}

Summary of changes:
Expand Down

0 comments on commit 3d760e3

Please sign in to comment.